-sub() {
- cat "$scriptfile" |\
- sed -r "s/\s*;.*//g; /^\s*$/ d; s/$inst0/0/; s/$inst1/1/; s/$inst2/2/; s/$inst3/3/; s/$inst4/4/; s/$inst5/5/; s/$inst6/6/; s/$inst7/700/; s/$inst8/8/; s/$inst9/9/; s/\s+//g" |\
- sed -e :a -e 's/^.\{1,4\}$/&0/;ta' |\
- sed 's/![0-9]//g'
-}
-
-[ -f "$scriptfile" ] && [ -f "$targetfile" ] || { echo "You are missing a file, please check that the current directory contains $scriptfile and $targetfile" && exit 1; }
-
-# If racket is installed run it directly
-[ ! -z "$(command -v racket)" ] && racket "$targetfile" && echo ""
+[ "$#" -ne 2 ] && { echo "Usage: cormackscript [cmks file] [output file]" && exit 1; }
+scriptfile="$1"; targetfile="$2"
+[ -f "$scriptfile" ] && [ -f "$targetfile" ] || { echo "Either $scriptfile or $targetfile do not exist" && exit 1; }