10 lines
261 B
Bash
10 lines
261 B
Bash
|
#!/bin/sh
|
||
|
# gleichstand 3
|
||
|
# gewonnen 6
|
||
|
# A X=Rock 1
|
||
|
# B Y=Paper 2
|
||
|
# C Z=Scissors 3
|
||
|
cat /dev/stdin | sed -e 's/A X/0+3/' -e 's/B X/0+1/' -e 's/C X/0+2/' \
|
||
|
-e 's/A Y/3+1/' -e 's/B Y/3+2/' -e 's/C Y/3+3/' \
|
||
|
-e 's/A Z/6+2/' -e 's/B Z/6+3/' -e 's/C Z/6+1/'
|