Visit Jeremy's Blog.
Go Back > Blogs > chakjoy
User Name


Rate this Entry

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

How can I do that?
Posted in Uncategorized
Views 458 Comments 0
« Prev     Main     Next »


All times are GMT -5. The time now is 07:43 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 @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration