while [ $A != 42 ] do read A if [ "$A" != 42 ]; then echo "$A" fi done