LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices

Old

Help with reading a file

Posted 03-17-2008 at 02:24 PM by chakjoy

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?
LQ Newbie
Posted in Uncategorized
Views 458 Comments 0 chakjoy is offline
Old

Reading from a file

Posted 03-17-2008 at 02:13 PM by chakjoy

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?
LQ Newbie
Posted in Uncategorized
Views 403 Comments 0 chakjoy is offline

  



All times are GMT -5. The time now is 02:47 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