summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2020-11-19 11:07:49 -0400
committerJoey Hess <joeyh@joeyh.name>2020-11-19 11:07:49 -0400
commitbee772e4b84b8006476e451f78f13b7ad3f9a440 (patch)
treed423a821d3df0bf9541a084d8cbaa2e8f1f10c1f
parent65e8e149a0dd2eb1c0f938904e6f62e91d4b29ce (diff)
downloadmoreutils-bee772e4b84b8006476e451f78f13b7ad3f9a440.tar.gz
add usage help
-rwxr-xr-xvipe4
1 files changed, 3 insertions, 1 deletions
diff --git a/vipe b/vipe
index 5dbd42f..548fbed 100755
--- a/vipe
+++ b/vipe
@@ -57,7 +57,9 @@ use Getopt::Long;
$/=undef;
my $suffix = "";
-GetOptions("suffix=s" => \$suffix) or die;
+if (! GetOptions("suffix=s" => \$suffix)) {
+ die "Usage: $0 [--suffix=extension]\n";
+}
$suffix = ".$suffix" if $suffix =~ m/^[^.]/;
my ($fh, $tmp)=tempfile(UNLINK => 1, SUFFIX => $suffix);