diff options
| author | Zach DeCook <zachdecook@librem.one> | 2022-04-28 10:35:07 -0400 |
|---|---|---|
| committer | Zach DeCook <zachdecook@librem.one> | 2022-04-28 10:35:07 -0400 |
| commit | 85d01bca438180ef4ebd0ac6e6c4377c2f524197 (patch) | |
| tree | 1fe31c7dc26c6ffc1f7dacf0e336a854b1a71ca0 /has.sh | |
| parent | 3282fadecfdc8b32a1368e105cbf38ec717a0bc7 (diff) | |
| download | gurglesolver-85d01bca438180ef4ebd0ac6e6c4377c2f524197.tar.gz | |
gurg: helper for easier faceting
Diffstat (limited to 'has.sh')
| -rwxr-xr-x | has.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/has.sh b/has.sh index 1a19a5f..f4c94bc 100755 --- a/has.sh +++ b/has.sh @@ -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 |
