Skip to content

Commit

Permalink
Merge pull request #182 from mknos/sleep-exitcode
Browse files Browse the repository at this point in the history
sleep: exit code on error
  • Loading branch information
briandfoy committed Jul 5, 2023
2 parents 13f30ab + b48b4c0 commit ab0b908
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bin/sleep
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ License: perl

use strict;

my ($VERSION) = '1.201';
my ($VERSION) = '1.202';

if (@ARGV) {
if ($ARGV [0] eq '-?') {
Expand All @@ -29,10 +29,11 @@ EOF
} elsif ($ARGV[0] =~ /^\d+$/) {
sleep $ARGV[0];
} else {
print "bad character\n";
warn "$0: invalid time interval\n";
exit 1;
}
} else {
print "arg count\n";
warn "$0: missing operand\n";
exit 1;
}

Expand Down Expand Up @@ -89,4 +90,3 @@ provided you do not restrict others to do the same.
=cut

0 comments on commit ab0b908

Please sign in to comment.