You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

31 lines
1.1 KiB

#!/bin/sh
mkdir -p text tino
if [ -z "`ls tino`" ]; then
cd tino
wget https://afsweb.clarkson.edu/class/cs241/as2/hollow.txt
wget https://afsweb.clarkson.edu/class/cs241/as2/bit-hollow.txt
wget https://afsweb.clarkson.edu/class/cs241/as2/zap-hollow.txt
wget https://afsweb.clarkson.edu/class/cs241/as2/kapow-hollow.txt
wget https://afsweb.clarkson.edu/class/cs241/as2/out.txt
cd ..
fi
[ -z "`ls text/hollow.txt`" ] && cp tino/hollow.txt text/
bin/atob text/hollow.txt text/bit-hollow.txt
bin/jabber text/bit-hollow.txt text/zap-hollow.txt
bin/wocky text/zap-hollow.txt text/kapow-hollow.txt
bin/btoa text/kapow-hollow.txt text/out.txt
echo "Diff bit-hollow"
[ -n "`diff text/bit-hollow.txt tino/bit-hollow.txt`" ] && echo "Files don't match"
echo "Diff zap-hollow"
[ -n "`diff text/zap-hollow.txt tino/zap-hollow.txt`" ] && echo "Files don't match"
echo "Diff kapow-hollow"
[ -n "`diff text/kapow-hollow.txt tino/kapow-hollow.txt`" ] && echo "Files don't match"
echo "Diff out"
if [ -n "`diff text/out.txt tino/out.txt`" ]; then
echo "Files don't match"
else
echo "Outputs are the same! :D"
fi