Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions bin/cat
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@ use Getopt::Std qw(getopts);
use constant EX_SUCCESS => 0;
use constant EX_FAILURE => 1;

my ($VERSION) = '1.3';

our $VERSION = '1.3';
my $Program = basename($0);

getopts('benstuv', \my %options) or do {
warn "$Program version $VERSION\n";
warn "usage: $Program [-benstuv] [file ...]\n";
exit EX_FAILURE;
};
Expand All @@ -51,6 +49,11 @@ foreach my $f (@ARGV) {
}
exit ($err ? EX_FAILURE : EX_SUCCESS);

sub VERSION_MESSAGE {
print "$Program version $VERSION\n";
exit EX_SUCCESS;
}

sub do_file {
my $name = shift;

Expand Down