aboutsummaryrefslogtreecommitdiff
path: root/bin/loc
blob: 813196c86427f27f3cf34eb19e64c6b776863442 (plain) (blame)
1
2
3
4
5
6
7
8
#!/bin/sh
if [ "$#" -eq 0 ] ; then
    printf >&2 'loc: Need a search term\n'
    exit 2
fi
for pat ; do
    find . -name '.*' ! -name '.' -prune -o -name '*'"$pat"'*' -prune -print
done