diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-04 12:18:12 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-04 12:18:12 +1200 |
commit | 4f34f5775ceb813feb395f13e5c5fd7b69e51b9d (patch) | |
tree | c5d9819a9cfeb7ed0886e7f053f1259c76ed7d1a /bin/stws | |
parent | Add issue about binscripts (diff) | |
download | dotfiles-4f34f5775ceb813feb395f13e5c5fd7b69e51b9d.tar.gz dotfiles-4f34f5775ceb813feb395f13e5c5fd7b69e51b9d.zip |
Consistent input checking for ed(1) scripts
Diffstat (limited to 'bin/stws')
-rwxr-xr-x | bin/stws | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1,7 +1,8 @@ #!/bin/sh # Strip trailing spaces on one or more files if [ "$#" -eq 0 ] ; then - printf >&2 'tstf: Need filenames\n' + printf >&2 'tstf: Need a filename\n' + exit 2 fi for fn ; do ed -s -- "$fn" <<'EOF' |