Tag Archives: TMPOUT

While loop shubshell problem

By sathyaonnuix

People,

Here is my code

Code:

while read ln
do
xyz=$(echo $ln/$val1*100-100|bc -l|xargs printf "%1.0fn")
if [ "$xyz" -le -50 ] && [ "$xyz" -ne 0 ]; then
iam="YELLOW"
fi
done <<< "$(grep "^[0-9]" $TMPOUT)"


where $TMPOUT is a flat file which contains a set of values.

Whilst executing the above, I get an error

Code:

ABC.ksh: line 136: unexpected EOF while looking for matching `"'
ABC.ksh: line 141: syntax error: unexpected end of file


Where is the problem, how i can correct it. Please help, thanks.

From: http://www.unix.com/shell-programming-scripting/221367-while-loop-shubshell-problem.html