x

Programs, configuration and documentation that don't fit anywhere else
Log | Files | Refs | README | LICENSE

commit dc04c8154f9f04bb3c3e4c7dfbf8e1f9a1de73c7
parent 4b4cf0e56882bf6d774614b8c0c3a0dafe6cd3ea
Author: Oliver Lowe <o@olowe.co>
Date:   Wed, 28 Sep 2022 13:01:25 +1000

webpaste: correctly exit with usage on too many args

Diffstat:
Mbin/webpaste | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/bin/webpaste b/bin/webpaste @@ -1,12 +1,13 @@ #!/bin/sh -usage="webpaste [file]" +usage="usage: webpaste [file]" -file='<-' +file='<-' # standard input if test $# -eq 1 then file="@$1" -else +elif test $# -gt 1 +then echo $usage exit 1 fi