mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-05 10:04:48 +00:00
26 lines
568 B
Plaintext
26 lines
568 B
Plaintext
NEW
|
||
PREFIX
|
||
AUTO 4,1
|
||
#!/BIN/SH
|
||
#
|
||
# This script uses READ to set a VAR and then attempts
|
||
# to test it for validity as a String or Number
|
||
#
|
||
ECHO "\n\nBasic READ and IF Testing\n\n"
|
||
READ -P "Please type and A and press return: " Z
|
||
ECHO "\nYou typed: $Z\n"
|
||
IF [ $Z = "A" ]
|
||
ECHO "Test Passed First IF"
|
||
ELSE
|
||
ECHO "Test Failed First IF"
|
||
FI
|
||
READ -P "Please type and 1 and press return: " Z
|
||
ECHO "\nYou typed: $Z\n"
|
||
IF [ $Z = "1" ]
|
||
ECHO "Test Passed Second IF"
|
||
ELSE
|
||
ECHO "Test Failed Second IF"
|
||
FI
|
||
MAN
|
||
TEXT /MAKE/USR/SHARE/TESTS/READIF
|