From fad17a0bdacc93a2f0ec4097ee5f4b0a033eee0e Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 7 Dec 2016 11:18:35 +1300 Subject: loc(1df) errors to stderr, exit --- bin/loc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/loc b/bin/loc index 642a081c..20ef432e 100755 --- a/bin/loc +++ b/bin/loc @@ -1,6 +1,7 @@ #!/bin/sh if [ "$#" -eq 0 ] ; then - printf 'loc: Need a search term\n' + printf >&2 'loc: Need a search term\n' + exit 2 fi for pat ; do find . -name '*'"$pat"'*' -- cgit v1.2.3