2021-01-02 01:01:53 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2023-06-25 20:36:49 +00:00
|
|
|
# SPDX-FileCopyrightText: 2021-2023 Ole Tange, http://ole.tange.dk and Free Software and Foundation, Inc.
|
2021-03-22 20:16:35 +00:00
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
2021-01-02 01:01:53 +00:00
|
|
|
par_whitespace_delimiter() {
|
|
|
|
echo 'bug #59779: parsort does not work with white characters as delimiters'
|
|
|
|
doit() {
|
|
|
|
del="$1"
|
2022-05-22 08:36:45 +00:00
|
|
|
tmp=$(mktemp)
|
2021-01-02 01:01:53 +00:00
|
|
|
(
|
|
|
|
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'
|
|
|
|
|
|
|
|
|