Computing.Net > Forums > Unix > while read loop

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

while read loop

Reply to Message Icon

Name: salem
Date: March 3, 2007 at 20:44:20 Pacific
OS: hpux
CPU/Ram: 2/4GB
Product: hp 9000
Comment:

I have written a script using a loop but when I execute it using while read, it only read the first line and quits the loop after processing the first line. If I change it from (while read) to (for i in) it reads all the lines and finishes the loop?

any advice will be appreciated



Sponsored Link
Ads by Google

Response Number 1
Name: ghostdog
Date: March 3, 2007 at 21:34:47 Pacific
Reply:

show your code pls


0

Response Number 2
Name: salem
Date: March 4, 2007 at 21:31:30 Pacific
Reply:

Never mind. I fixed it, there was a typ'o with one of the variables.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: while read loop

While Read issue www.computing.net/answers/unix/while-read-issue/8140.html

While read is ignoring if statement www.computing.net/answers/unix/while-read-is-ignoring-if-statement/7435.html

substitute & retain field seprator www.computing.net/answers/unix/substitute-amp-retain-field-seprator/6315.html