2007-09-10 20:28:03 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2021-12-26 22:29:28 +00:00
|
|
|
# SPDX-FileCopyrightText: 2021-2022 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
|
|
|
|
|
2013-12-19 01:19:19 +00:00
|
|
|
TMP=/run/shm/parallel_$$
|
|
|
|
|
2021-05-22 23:18:09 +00:00
|
|
|
rsync -Ha --delete input-files/testdir/ $TMP/
|
2021-04-24 22:14:51 +00:00
|
|
|
mkdir -p $TMP
|
2013-12-19 01:19:19 +00:00
|
|
|
cd $TMP/
|
2007-09-10 20:28:03 +00:00
|
|
|
|
2010-10-26 23:50:58 +00:00
|
|
|
echo echo test of cat pipe sh | parallel -j 50 2>&1
|
2012-08-13 18:17:14 +00:00
|
|
|
find . -name '*.jpg' | parallel -j +0 convert -geometry 120 {} {//}/thumb_{/}
|
2007-09-10 20:28:03 +00:00
|
|
|
|
2018-10-22 22:46:38 +00:00
|
|
|
ls | parallel ls | LC_ALL=C sort
|
|
|
|
ls | parallel echo ls | LC_ALL=C sort
|
|
|
|
ls | parallel -j 1 echo ls | LC_ALL=C sort
|
|
|
|
find -type f | parallel diff {} a/foo ">"{}.diff | LC_ALL=C sort
|
|
|
|
ls | parallel -v --group "ls {}|wc;echo {}" | LC_ALL=C sort
|
2013-08-14 18:11:00 +00:00
|
|
|
echo '### Check that we can have more input than max procs (-j 0) - touch'
|
2018-10-22 22:46:38 +00:00
|
|
|
perl -e 'print map {"more_than_5000-$_\n" } (4000..9999)' | parallel -vj 0 touch | LC_ALL=C sort | tail
|
2013-08-14 18:11:00 +00:00
|
|
|
echo '### rm'
|
2018-10-22 22:46:38 +00:00
|
|
|
perl -e 'print map {"more_than_5000-$_\n" } (4000..9900)' | parallel -j 0 rm | LC_ALL=C sort
|
2022-02-17 12:19:55 +00:00
|
|
|
cat <<'EOF' | sed -e 's/;$/; /;s/$SERVER1/'$SERVER1'/;s/$SERVER2/'$SERVER2'/' | stdout parallel -vj0 -k --joblog /tmp/jl-`basename $0` -L1 | egrep -v 'parallel: Warning: (Starting|Consider|Only|Try)'
|
2018-10-22 22:46:38 +00:00
|
|
|
ls | parallel -j500 'sleep 1; find {} -type f | perl -ne "END{print $..\" "{=$_=pQ($_)=}"\n\"}"' | LC_ALL=C sort
|
|
|
|
ls | parallel --group -j500 'sleep 1; find {} -type f | perl -ne "END{print $..\" "{=$_=pQ($_)=}"\n\"}"' | LC_ALL=C sort
|
|
|
|
find . -type f | parallel --group "perl -ne '/^\\S+\\s+\\S+$/ and print \$ARGV,\"\\n\"'" | LC_ALL=C sort
|
|
|
|
find . -type f | parallel -v --group "perl -ne '/^\\S+\\s+\\S+$/ and print \$ARGV,\"\\n\"'" | LC_ALL=C sort
|
|
|
|
find . -type f | parallel -q --group perl -ne '/^\S+\s+\S+$/ and print $ARGV,"\n"' | LC_ALL=C sort
|
|
|
|
find . -type f | parallel -qv --group perl -ne '/^\S+\s+\S+$/ and print $ARGV,"\n"' | LC_ALL=C sort
|
2013-08-14 18:11:00 +00:00
|
|
|
EOF
|
2007-09-10 20:28:03 +00:00
|
|
|
|
2015-07-22 06:28:05 +00:00
|
|
|
cd - >/dev/null
|
2013-12-19 01:19:19 +00:00
|
|
|
rm -rf $TMP/
|