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

Notices

Uncategorized Entries with no category
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 460 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 405 Comments 0 chakjoy is offline

  



All times are GMT -5. The time now is 12:50 AM.

Main Menu
Advertisement

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