From f85948f09f8bc0af4eb25e0b54a0ba3a8e758b17 Mon Sep 17 00:00:00 2001 From: Michael Mikonos <127171689+mknos@users.noreply.github.com> Date: Thu, 14 Mar 2024 16:13:13 +0800 Subject: [PATCH] join: '--' option terminator (#504) * 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 --- bin/join | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/join b/bin/join index ab48ca25..4c18c047 100755 --- a/bin/join +++ b/bin/join @@ -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');