- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Get rid of the first line of an output file
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
Forums
Discussions
Discussions
Discussions
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
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
10-31-2005 08:59 PM
10-31-2005 08:59 PM
I've found an anoying problem with "tail".
I've got an output file that is more that 5000 lines long. This needs to be cleaned up to be used as a load for a database. I can clean up all the file as needed, but I need to get rid of the header info. Usually, I would do a
"wc -l" on the file, do a sum to take off say 1 or 2 lines, then do a "tail -n
BUT "tail" seems to have a limit on it, and so dosen't report the whole file back to me.
Does anyone have a little trick up their sleeve to get round this please.
Thanks,
Sime.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2005 09:03 PM
10-31-2005 09:03 PM
Solutionsplit -n 10000 filename
tail -9999 xxa > trimmedfile
cat trimmedfile xxb xxc xxd > filename
Or something like that, you may have to tailor it so that tail can cope.
Probably not the best solution, it's a thought though.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2005 09:05 PM
10-31-2005 09:05 PM
Re: Get rid of the first line of an output file
sed '1d'
I guess I need to wake up a bit......
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2005 09:21 PM
10-31-2005 09:21 PM
Re: Get rid of the first line of an output file
will also print lines from 2 to the end of the file...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2005 09:25 PM
10-31-2005 09:25 PM
Re: Get rid of the first line of an output file
I hope you like it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2005 03:33 AM
11-02-2005 03:33 AM
Re: Get rid of the first line of an output file
Assume there are three header lines:
awk '{if(NR>3){print}}' filename
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2005 05:17 AM
11-02-2005 05:17 AM