- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- awk '{ print $9 until the end of the line...}'
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-22-2001 04:38 AM
тАО11-22-2001 04:38 AM
ll /
for example and want to awk for the filename,
if that file name is a link there'll be a -> link in the filename
at least the one I want to extract..
how do I specify, from $9 to the end of the line using awk..
Thanks.
Bill
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-22-2001 04:45 AM
тАО11-22-2001 04:45 AM
Re: awk '{ print $9 until the end of the line...}'
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-22-2001 04:48 AM
тАО11-22-2001 04:48 AM
Re: awk '{ print $9 until the end of the line...}'
You are getting lazy with your awk :-)
dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-22-2001 04:49 AM
тАО11-22-2001 04:49 AM
Re: awk '{ print $9 until the end of the line...}'
# ... awk '{print substr($9,index($0,$9))}'
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-22-2001 04:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-22-2001 04:49 AM
тАО11-22-2001 04:49 AM
Re: awk '{ print $9 until the end of the line...}'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-22-2001 04:56 AM
тАО11-22-2001 04:56 AM
Re: awk '{ print $9 until the end of the line...}'
#ll

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-22-2001 05:00 AM
тАО11-22-2001 05:00 AM
Re: awk '{ print $9 until the end of the line...}'
One more thing, to ignore the 1st line, start the awk with:
awk 'NR>1{...
The index version will not work exactly if the filename is, say, rw (which mine often are!), since it will pick up the "rw" in the permissions.
Rgds, Robin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-22-2001 07:09 AM
тАО11-22-2001 07:09 AM
Re: awk '{ print $9 until the end of the line...}'
Have a great day!
Thanks,
Bill
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-23-2001 02:25 AM
тАО11-23-2001 02:25 AM
Re: awk '{ print $9 until the end of the line...}'
ll | tr -s " " | cut -d" " -f9- | tail +2

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-23-2001 07:24 PM
тАО11-23-2001 07:24 PM
Re: awk '{ print $9 until the end of the line...}'
Did you report your 404s to Dan's thread on forum Issues?
I believe he uses the info to generate some mothly reports or such.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-24-2001 12:07 PM
тАО11-24-2001 12:07 PM
Re: awk '{ print $9 until the end of the line...}'
Great, ironic (?) catch, Robin. I flat missed the match that would occur. What's more, I even bungled the brain to fingers connection, meaning to have written:
...awk '{print substr($0,index($0,$9))}'
In any event, the "shortcut" I suggested clearly has deficiencies. Thanks for catching it!
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-26-2001 09:14 AM
тАО11-26-2001 09:14 AM
Re: awk '{ print $9 until the end of the line...}'
Thanks all.
Later,
Bill