diff --git a/src/parallel b/src/parallel index f0ad1aa8..c0e1ca4d 100755 --- a/src/parallel +++ b/src/parallel @@ -860,10 +860,9 @@ sub read_options { # Program is called from #! line in script $ARGV[0]=~s/^--shebang *//; # remove --shebang if it is set $ARGV[0]=~s/^--hashbang *//; # remove --hashbang if it is set - my $argfile = pop @ARGV; + my $argfile = shell_quote_scalar(pop @ARGV); # exec myself to split $ARGV[0] into separate fields exec "$0 --skip-first-line -a $argfile @ARGV"; - #exec "tail -n +1 $argfile | $0 @ARGV"; } Getopt::Long::Configure("bundling","pass_through"); diff --git a/testsuite/tests-to-run/parallel-local20.sh b/testsuite/tests-to-run/parallel-local20.sh index 913a5024..f2fe6576 100644 --- a/testsuite/tests-to-run/parallel-local20.sh +++ b/testsuite/tests-to-run/parallel-local20.sh @@ -21,14 +21,14 @@ chmod 755 /tmp/shebang /tmp/shebang echo '### Test of #! with 2 files as input (2 columns)' -cat >/tmp/shebang <'/tmp/she "' <"' seq 1 3 >/tmp/123 -/tmp/shebang +'/tmp/she "' echo '### bug #36595: silent loss of input with --pipe and --sshlogin' seq 10000 | xargs | parallel --pipe -S 10/localhost cat | wc