cs252/lab3-src/test-shell/test_parsing2

17 lines
378 B
Plaintext
Raw Normal View History

2018-10-25 14:45:56 -04:00
#!/bin/bash
rm csh-out shell-out
echo -e "\033[1;4;93mTest_parsing2: Parsing - Words and Special Characters\033[0m"
echo "ls|grep fil" > shell-in
echo "ls|grep fil" > csh-in
/bin/sh < csh-in > csh-out
../shell < shell-in > shell-out
diff shell-out csh-out
if [ $? -ne 0 ]
then
echo -e "\033[1;31m$0 Failed\033[0m"
exit -1
fi
echo -e "\033[1;32m$0 Passed\033[0m"
exit 0