This will allow you to read any line number is all shell enviroments:

cat file.txt | sed -n 1p

Where file.txt is the file to read from, and 1 is the line of the file.

Jay Schulist
[EMAIL PROTECTED]

On Mon, 7 Feb 2000, Kervin wrote:

> 
> Hi there,
> 
> Does anyone know how to read a file one line at a time in bourne shell?
> 
> I usually program in ksh, and I use "read -u3 $var" where the three is a
> file discriptor opened using "exec".  The bourne version of read does not
> support this and I can't find a suitable replacement.
> 
> any ideas?
> 
> ____________________________________________________________
> Kervin Pierre, CCNA
> 
> If a computer crashes in the forest and no one is there to
> reboot it, does it still save .bak files?
> -- Anon., Tech Wisdom #4
> 
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
> the body of a message to [EMAIL PROTECTED]
> Please read the FAQ at http://www.linux-learn.org/faqs
> 


-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.linux-learn.org/faqs

Reply via email to