Website Summary Files Commits Branches @commit @diff @stats
path: root / homework / 81281 / brainfsckInterpreter / runMeChooseMode.sh
blob: 4162db4faebc170bd2a67f91b6e4fe4478222473 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

echo -ne "Please enter 0 for live interpreter or 1 for interpretation of a file: "
read mode

base=`pwd`"/interpreterMain.pl"

if [ $mode == 0 ]
then
    exec swipl -q -f "$base" ""
else
    echo -n "Please enter the name of the file: "
    read fileName
    exec swipl -q -f "$base" "$fileName"
fi