
Untitled
By: a guest on
Apr 24th, 2012 | syntax:
None | size: 0.60 KB | hits: 13 | expires: Never
Bash: read inside while loop
NUM_LINE=0
while read line; do
let NUM_LINE+=1
if [ $NUM_LINE -lt 41 ]; then
echo -e "t$BLANC|$ORIGINAL $line $BLANC|"
else
echo -e "nt$BLANC## "$GRIS"Llista de Nodes sel·leccionats $BLANC############$ORIGINALn"
read AUX
NUM_LINE=0
fi
done <$NODES
exec 3<$NODES
NUM_LINE=0
while read -u 3 -r line; do
(( NUM_LINE++ ))
if (( NUM_LINE < 41 )); then
echo -e "t$BLANC|$ORIGINAL $line $BLANC|"
else
echo -e "nt$BLANC## "$GRIS"Llista de Nodes sel·leccionats $BLANC############$ORIGINALn"
read AUX
NUM_LINE=0
fi
done