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

unix-shell-programming-revised-edition-programs/game -rw-r--r-- 333 bytes
fc214385Johan Vandegriff added other old scripts, some newer ones too 1 year, 8 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
cd `dirname $0`
#test -d get_mouse_position || exit
mouse=`./get_mouse_position`
position="2"
if echo $mouse | grep "button1" && [ "$position" -gt "0" ]
then
  position=`expr "$position" - "1"`
fi

if echo $mouse | grep "button2" && [ "$position" -lt "4" ]
then
  position=`expr "$position" + "1"`
fi

echo $random
read a