From 67f2a6dfaa3c343044c7f420a9e414935016e6d8 Mon Sep 17 00:00:00 2001 From: Ole Tange Date: Tue, 11 Sep 2007 10:52:54 +0200 Subject: [PATCH] Fixed bug: parallel -j 50 without command does not act as cat | sh --- parallel | 2 +- unittest/actual-results/test01 | 1 + unittest/tests-to-run/test01.sh | 1 + unittest/wanted-results/test01 | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/parallel b/parallel index 6e34b4a0..37e255e6 100755 --- a/parallel +++ b/parallel @@ -304,7 +304,7 @@ $command = undef; $Global::verbose = 0; $Global::grouped = 1; $Global::quoting = 0; -$Global::input_is_filename = (defined @ARGV); +$Global::input_is_filename = (@ARGV); $/="\n"; $Global::debug = (defined $::opt_d); diff --git a/unittest/actual-results/test01 b/unittest/actual-results/test01 index 98c8c9ab..0ee9ca04 100644 --- a/unittest/actual-results/test01 +++ b/unittest/actual-results/test01 @@ -1,3 +1,4 @@ +test of cat pipe sh 1-col.txt 2-col.txt bar diff --git a/unittest/tests-to-run/test01.sh b/unittest/tests-to-run/test01.sh index 93f6318f..62a08e03 100644 --- a/unittest/tests-to-run/test01.sh +++ b/unittest/tests-to-run/test01.sh @@ -4,6 +4,7 @@ rm -rf tmp 2>/dev/null cp -a input-files/testdir tmp cd tmp +echo echo test of cat pipe sh | parallel -j 50 2>&1 find . -name '*.jpg' | parallel -j +0 convert -geometry 120 {} {}_thumb.jpg find . -name '*_thumb.jpg' | ren 's:/([^/]+)_thumb.jpg$:/thumb_$1:' diff --git a/unittest/wanted-results/test01 b/unittest/wanted-results/test01 index 98c8c9ab..0ee9ca04 100644 --- a/unittest/wanted-results/test01 +++ b/unittest/wanted-results/test01 @@ -1,3 +1,4 @@ +test of cat pipe sh 1-col.txt 2-col.txt bar