mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-12-26 06:37:56 +00:00
parallel: --header will now parse the first line and you can use column names as {colname}. Experimental => man missing.
This commit is contained in:
parent
8c4b0ba4b9
commit
92d7c462e7
|
@ -83,7 +83,7 @@ if($::opt_header) {
|
|||
::debug("Delimiter: '$delimiter'");
|
||||
for my $s (split /$delimiter/o, $line) {
|
||||
::debug("Colname: '$s'");
|
||||
$command =~ s/\{$s\}/\{$id\}/g;
|
||||
$command =~ s:\{$s(|/|//|\.|/\.)\}:\{$id$1\}:g;
|
||||
$id++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ echo '### Test --resume --joblog followed by --resume --joblog';
|
|||
cat /tmp/joblog2 | wc;
|
||||
rm -f /tmp/joblog2;
|
||||
echo '### Test --header';
|
||||
printf "a\tb\n1\t2" | parallel --header echo {b} {a}
|
||||
printf "a\tb\n1.2\t3/4.5" | parallel --header echo {b} {a} {b.} {b/} {b//} {b/.};
|
||||
EOF
|
||||
|
||||
echo '### Test --shellquote'
|
||||
|
|
|
@ -31,7 +31,7 @@ parallel: -H has been retired. Use --halt.
|
|||
### Test --resume --joblog followed by --resume --joblog
|
||||
5 49 205
|
||||
### Test --header
|
||||
2 1
|
||||
3/4.5 1.2 3/4 4.5 3 4
|
||||
### Test --shellquote
|
||||
awk\ -v\ FS=\"\\\",\\\"\"\ \'\{print\ \$1,\ \$3,\ \$4,\ \$5,\ \$9,\ \$14\}\'\ \|\ grep\ -v\ \"\#\"\ \|\ sed\ -e\ \'1d\'\ -e\ \'s/\\\"//g\'\ -e\ \'s/\\/\\/\\//\\t/g\'\ \|\ cut\ -f1-6,11\ \|\ sed\ -e\ \'s/\\/\\//\\t/g\'\ -e\ \'s/\ /\\t/g
|
||||
### Test make .deb package
|
||||
|
|
Loading…
Reference in a new issue