Skip to content

Commit

Permalink
join: '--' option terminator (#504)
Browse files Browse the repository at this point in the history
* Found this when testing against the GNU version of join
* Add handling to custom option parser get_options()
* test: "cp awk ./-a && perl join -- -a -a | md5sum" --> join file "-a" with itself
  • Loading branch information
mknos committed Mar 14, 2024
1 parent 2c17f79 commit f85948f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bin/join
Expand Up @@ -250,6 +250,7 @@ sub get_field_specs {
sub get_options {
while (@ARGV && $ARGV[0] =~ /^-(.)/) {
local $_ = shift @ARGV;
return if $_ eq '--';
if (/^-[h?]$/) { help() } # terminates
elsif (s/^-a//) {
my $f = get_file_number('a');
Expand Down

0 comments on commit f85948f

Please sign in to comment.