about summary refs log tree commit diff
path: root/has.sh
blob: f4c94bc4d5f540f3501e5fc832d6627d9a129972 (plain)
1
2
3
4
5
6
7
#!/bin/sh
# Has "$1", not in the "$2"th position
if test "$1" = "."; then
	cat -
else
	cat - | grep "$1" | grep -v "$(echo "12345" | tr "$2" "$1" | tr [:digit:] .)"
fi