LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices



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

Rep: Reputation: 0
Reading a file from second row


Hi,

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
do
echo $line >> $out_file
done < test.txt

How can I do that?

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

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


Closed Thread

Tags
scripting


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 02:31 AM.

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