Fixed: bug #37956: --colsep does not default to '\t' as specified in the man page.

This commit is contained in:
Ole Tange 2012-12-19 15:37:36 +01:00
parent 86808fed5d
commit b6056bb876
3 changed files with 7 additions and 2 deletions

View file

@ -687,7 +687,7 @@ sub parse_options {
if(defined $opt::tmpdir) { $ENV{'TMPDIR'} = $opt::tmpdir; }
if(defined $opt::help) { die_usage(); }
if(defined $opt::colsep) { $Global::trim = 'lr'; }
# if(defined $opt::header) { $opt::colsep = defined $opt::colsep ? $opt::colsep : "\t"; }
if(defined $opt::header) { $opt::colsep = defined $opt::colsep ? $opt::colsep : "\t"; }
if(defined $opt::trim) { $Global::trim = $opt::trim; }
if(defined $opt::arg_sep) { $Global::arg_sep = $opt::arg_sep; }
if(defined $opt::arg_file_sep) { $Global::arg_file_sep = $opt::arg_file_sep; }

View file

@ -6,7 +6,7 @@ SERVER2=parallel-server2
# -L1 will join lines ending in ' '
cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | parallel -j10 -k -L1
echo "### Test --delay"
seq 9 | /usr/bin/time -f %e parallel -j3 --delay 0.53 true {} 2>&1 |
seq 9 | /usr/bin/time -f %e parallel -j3 --delay 0.57 true {} 2>&1 |
perl -ne '$_ > 5 and print "More than 5 secs: OK\n"'
echo '### Test -k 5';
@ -41,4 +41,7 @@ seq 1 10 | parallel -j 3 echo | sort
echo "bug #37694: Empty string argument skipped when using --quote"
parallel -q --nonall perl -le 'print scalar @ARGV' 'a' 'b' ''
echo "bug #37956: --colsep does not default to '\t' as specified in the man page."
printf "A\tB\n1\tone" | parallel --header : echo {B} {A}
EOF

View file

@ -48,3 +48,5 @@ d
9
bug #37694: Empty string argument skipped when using --quote
3
bug #37956: --colsep does not default to '\t' as specified in the man page.
one 1