unixy scripts to help you solve that famous word puzzle game
Diffstat (limited to 'has.sh')
| -rwxr-xr-x | has.sh | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1,3 +1,7 @@ #!/bin/sh # Has "$1", not in the "$2"th position -cat - | grep "$1" | grep -v "$(echo "12345" | tr "$2" "$1" | tr [:digit:] .)" +if test "$1" = "."; then + cat - +else + cat - | grep "$1" | grep -v "$(echo "12345" | tr "$2" "$1" | tr [:digit:] .)" +fi |