shell - Why is second Echo being displayed first in a while loop? -
shell - Why is second Echo being displayed first in a while loop? -
i testing little script see if can kill multiple jobs in autosys. shell script not working, somehow echo of variable displays before echo start. sec echo run in kid program?
#!/bin/bash while ifs=read line; echo "start" echo "$line" done < "run.dat"
i want output start line in run.dat start line in run.dat
but getting line in run.dat start
please suggest.
removing ifs=read
not right answer.
adding space between ifs=
, read
is.
that line says while
ifs=read
line
(i.e. while line
command returns true when ifs
variable has value read
in line
command's environment).
see http://mywiki.wooledge.org/bashfaq/001 more information/details.
shell
Comments
Post a Comment