[#] Bash - pytanie / odpowiedź

( Ostatnio zmieniony sob., 10/01/2009 - 01:07 )
 
#!/bin/sh
answer=""
while [ ${#answer} -eq 0 ]
do
 echo -n "Question ? (t/n) ? "
 read answer
 if [ "$answer" != "t" ] && [ "$answer" != "n" ]; then answer=""; fi
done

if [ "$answer" == "t" ]; then
        echo "execute...."
fi
5
Twoja ocena: Brak Średnio: 5 (2 głosy)