LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices


Old

Help with reading a file

Posted 03-17-2008 at 01: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 753 Comments 0 chakjoy is offline
Old

Reading from a file

Posted 03-17-2008 at 01: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 608 Comments 0 chakjoy is offline

  



All times are GMT -5. The time now is 09:35 PM.

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
Open Source Consulting | Domain Registration