mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-25 15:37:56 +00:00
28 lines
659 B
Bash
28 lines
659 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
par_whitespace_delimiter() {
|
||
|
echo 'bug #59779: parsort does not work with white characters as delimiters'
|
||
|
doit() {
|
||
|
del="$1"
|
||
|
tmp=$(tempfile)
|
||
|
(
|
||
|
printf "a%s8%se\n" "$del" "$del"
|
||
|
printf "b%s7%sf\n" "$del" "$del"
|
||
|
printf "c%s3%sg\n" "$del" "$del"
|
||
|
printf "d%s5%sh\n" "$del" "$del"
|
||
|
) > "$tmp"
|
||
|
parsort -t "$del" -k2 "$tmp"
|
||
|
}
|
||
|
doit ','
|
||
|
doit ' '
|
||
|
tab="$(printf '\t')"
|
||
|
doit "$tab"
|
||
|
}
|
||
|
|
||
|
export -f $(compgen -A function | grep par_)
|
||
|
compgen -A function | grep par_ | LC_ALL=C sort |
|
||
|
parallel --timeout 1000% -j6 --tag -k --joblog /tmp/jl-`basename $0` '{} 2>&1' |
|
||
|
perl -pe 's:/usr/bin:/bin:g'
|
||
|
|
||
|
|