~johanvandegriff/unix-shell-programming-revised-edition-programs

unix-shell-programming-revised-edition-programs/maze/old/maze_old.sh -rw-r--r-- 748 bytes
fc214385Johan Vandegriff added other old scripts, some newer ones too 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh
if [ ! -d $HOME/programs/maze/maze ]
then
    $HOME/programs/maze/makemaze
fi
cd $HOME/programs/maze/maze
while true
do
    if [ -d end ]
    then
        echo "You found the end!"
        echo "Press ENTER to exit."
        read a
        exit 0
    fi
    ls -1
echo 'B (Back)'
echo 'Q (Quit)'
echo '
 _    _     _    _____   ___
| \  / |   /_\  |__  /  | __|
||\\//||  //_\\   / /_  | __|
|| \/ || //   \\ /____| |___|
'
echo -n 'Please choose one of the above '
read choice
#    case "$choice" in
#       [0-9]) cd "$choice" ;;
#        [Bb]) if [ ! `pwd` = "$HOME/maze" ]
#              then
#                cd ..
#              fi ;;
#        [Qq]) exit 0 ;;
#     [Ll]ost) pwd;;
#    esac
done