mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-25 15:37:56 +00:00
32 lines
812 B
Bash
32 lines
812 B
Bash
#!/bin/bash
|
|
|
|
# SPDX-FileCopyrightText: 2021-2022 Ole Tange, http://ole.tange.dk and Free Software and Foundation, Inc.
|
|
#
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
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'
|
|
|
|
|