LinuxAnswers - the LQ Linux tutorial section.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


Closed Thread
  Search this Thread
Old 03-17-2008, 03:00 PM   #1
LQ Newbie
Registered: Feb 2008
Posts: 5
Blog Entries: 2

Rep: Reputation: 0
Reading a file from second row


I have a question.

I have a file test.txt like the following:

Name | ID | Details | Comment
data1 data2 data3 data4
data5 data6 data7 data8
data9 data10 data11 data12

I want to read from this file from the second row (where the actual data lies) as follows:

while read line
echo $line >> $out_file
done < test.txt

How can I do that?

Thanks for your help.
Old 03-17-2008, 03:26 PM   #2
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,047
Blog Entries: 11

Rep: Reputation: 907Reputation: 907Reputation: 907Reputation: 907Reputation: 907Reputation: 907Reputation: 907Reputation: 907
Asking that question once is quite enough.

Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell script to parse csv-like output, row by row utahnix Linux - General 8 12-08-2007 06:03 AM
how to get the second column and first row data from a file??? loplayers Linux - Newbie 3 11-05-2007 08:35 PM
Delete the first row from a text file loopoo Linux - Newbie 2 08-15-2006 03:57 AM
C++ read csv file row into vector taban1 Programming 3 11-08-2004 03:01 PM
How do I select a row of info in a database file? 1rulesall Linux - Newbie 6 12-08-2003 09:27 PM

All times are GMT -5. The time now is 06:48 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration