aboutsummaryrefslogtreecommitdiff
path: root/bin/u2d
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-08-04 09:57:57 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-08-04 09:57:57 +1200
commitf5a9f3a72dbbdb2240025114a5e9425767d16bc2 (patch)
tree3aee09f705f9f185909642d0b769231398f31d24 /bin/u2d
parentMake d2u(1) and u2d(1) executable (diff)
downloaddotfiles-f5a9f3a72dbbdb2240025114a5e9425767d16bc2.tar.gz
dotfiles-f5a9f3a72dbbdb2240025114a5e9425767d16bc2.zip
Make d2u(1) and u2d(1) error out on no args
Diffstat (limited to 'bin/u2d')
-rwxr-xr-xbin/u2d4
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/u2d b/bin/u2d
index 5b4a96b6..662876e3 100755
--- a/bin/u2d
+++ b/bin/u2d
@@ -1,4 +1,8 @@
#!/bin/sh
+if [ "$#" -eq 0 ] ; then
+ printf >&2 'u2d: Need a filename\n'
+ exit 2
+fi
r=$(printf '\r')
for fn ; do
ed -s -- "$fn" <<EOF || ex=1