Skip to content

Commit

Permalink
unshar: '--' option terminator (#481)
Browse files Browse the repository at this point in the history
* I noticed that shar works with command line "perl shar -- -file1", but unshar doesn't
* There was no unshar command on my Linux or OpenBSD system to test against
* I installed gnu sharutils 4.15.2 and proved that it does support '--'

/usr/bin/unshar -- -file1
fs error 2 (No such file or directory) stat-ing -file1
  • Loading branch information
mknos committed Mar 4, 2024
1 parent ccd7fcf commit cd9390b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bin/unshar
Expand Up @@ -20,6 +20,7 @@ License: perl

while (@ARGV && $ARGV[0] =~ s/^-//) {
local $_ = shift;
last if $_ eq '-'; # '--' terminator
while (/([cdfq])/g) {
if ($1 eq 'd') {
$opts{'d'} = /\G(.*)/g && $1 ? $1 : shift;
Expand Down

0 comments on commit cd9390b

Please sign in to comment.