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
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?
Summary: Hi all, I'm using ksh, and having a problem with what I thought would be a stupid simple script... I have an input file that looks like: 11111 aaaaa 22222 bbbbb 33333 ccccc So I am trying ...
Summary: I have written a scipt that will report when a drive is down, but i finding if the status of the drive is UP, then "while read LINE" ignores the IF statement. I want the script to print the echo "Al...
Summary: Your while statement reads its first line (from the defaulted stdin that was declared by the exec statement) into the $line variable (which your code does not utilize). That first while loop iteratio...