ksh: while read doesn't get to read more than one variable
Hi!
I'm working with these scripts built for bash. It happens that it can almost work perfectly on ksh, but there is a construct that doesn't do the job at all:
while read variable1 variable2 etc
The thing is that only the first variable is set. All the others are empty.
now, read by itself (no while) can set many variables read from it's stdin... and if I'm reading from a file then I can (but hate) read the file line by line (with tail -n x | head -n 1 | read variable1 variable2 etc)... but if I'm reading from stdin directly I'm stuck.
So... how can I use while read variable1 variable2 etc on ksh?
Thanks in advance!
|