Skip to content

Commit

Permalink
ARGV=='-' means /dev/stdin
Browse files Browse the repository at this point in the history
  • Loading branch information
tseemann committed Oct 15, 2018
1 parent 9eb16cf commit cda5ed5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion any2fasta
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ use IO::Uncompress::AnyUncompress;

#......................................................................................

our $VERSION = "0.2.2";
our $VERSION = "0.2.3";
our $EXE = basename($0);
our $FORMAT = "%a %d";
our $STDIN = '/dev/stdin'; # '-' will be replaced with this

#......................................................................................

Expand Down Expand Up @@ -71,6 +72,7 @@ my $processed=0;

for my $fname (@ARGV) {
msg("Opening: $fname");
$fname = $STDIN if $fname eq '-';
-d $fname and err("'$fname' is a directory not a file");
-r $fname or err("'$fname' is not readable");

Expand Down

0 comments on commit cda5ed5

Please # to comment.