If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > Delete the first row from a text file

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-15-06, 03:29
loopoo loopoo is offline
Registered User
 
Join Date: Aug 2005
Posts: 23
Delete the first row from a text file

Hi!

I need help on this following issue: i have a big 2 GB flat text file and i want to remove only its first line.
How can i do that ??


Thanks in advance!
Reply With Quote
  #2 (permalink)  
Old 08-15-06, 04:07
osy45 osy45 is offline
Registered User
 
Join Date: Nov 2002
Posts: 833
a1.txt
1aaaa
2bbbb
3cccc

sed '1d' a1.txt > a2.txt

a2.txt
2bbbb
3cccc
Reply With Quote
  #3 (permalink)  
Old 08-15-06, 04:57
loopoo loopoo is offline
Registered User
 
Join Date: Aug 2005
Posts: 23
thanks a lot for your help,

chris
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On