A2osX/TESTS/READIF.txt
2019-03-02 21:15:17 -05:00

32 lines
604 B
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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
ECHO "\nYou typed: $Z\n"
IF [ $Z = "A" ]
ECHO "Test Passed First IF"
ECHO
ELSE
ECHO "Test Failed First IF"
ECHO
FI
READ -P "Please type and 1 and press return: " Z
ECHO
ECHO "\nYou typed: $Z\n"
IF [ $Z = "1" ]
ECHO "Test Passed Second IF"
ECHO
ELSE
ECHO "Test Failed Second IF"
ECHO
FI
MAN
TEXT /MAKE/USR/SHARE/TESTS/READIF