parallel: Man page for --dry-run. Small bug fixes.

This commit is contained in:
Ole Tange 2010-12-16 00:12:02 +01:00
parent bff9531219
commit 5a87ded0d1
10 changed files with 32 additions and 40 deletions

View file

@ -1,17 +1,4 @@
parallel: --dryrun implemented. --return of multiple files with
-X. --return of files containing space.
== Bug ==
--trc {}' 'done
echo 1' '2 | parallel -vv --trc {}' 'done -S nlv.pi.dk touch {}' 'done
(echo 1' '2;echo a' 'b) | parallel -qvv --trc {}' 'done -S nlv.pi.dk touch {}' 'done
== Bug? ==
= Bug? ==
locate .gz | parallel -X find {} -size +1000 -size -2000 | parallel --workdir ... -S .. --trc {/}.bz2 'zcat {} | bzip2 > {/}.bz2'
@ -21,30 +8,16 @@ locate .gz | parallel -X find {} -size +1000 -size -2000 | parallel --workdir ..
http://code.google.com/p/spawntool/
http://code.google.com/p/push/
== Basename ==
find mp3/ -iname "*.mp3" | parallel -j+0 lame -S -q1 --vbr-new -V6 -b 32 -B128 {} /mnt/sda1/tmp-zik/{/}
== Bug? ==
.parallel/config with --long-options
time find . -type f | parallel -j+0 --eta -S..,: --progress --trc {}.gz gzip {}
== Bug --eta ==
Only negative.
== Workdir ==
Bug: {2} in --return
parallel -N2 --workdir ... --cleanup --transfer --return {2}.2 -S .. -v echo {} ">{2}.2" ::: ./tmp/foo ./tmp/bar
== load ==
Include niceload
Have an option to not spawn new tasks until load is below a limit computed like number of jobs.
== SQL ==
Example with %0a as newline

View file

@ -510,6 +510,9 @@ sub shell_unquote {
my (@strings) = (@_);
my $arg;
for $arg (@strings) {
if(not defined $arg) {
$arg = "";
}
$arg =~ s/'\n'/\n/g; # filenames with '\n' is quoted using \'
$arg =~ s/\\([\002-\011\013-\032])/$1/g;
$arg =~ s/\\([\#\?\`\(\)\*\>\<\~\|\; \"\!\$\&\'])/$1/g;

View file

@ -312,6 +312,15 @@ occurs as a line of input, the rest of the input is ignored. If
neither B<-E> nor B<-e> is used, no end of file string is used.
=item B<--dry-run>
Print the job to run on standard output, but do not run the job. Use
B<-v -v> to include the ssh/rsync wrapping if the job would be run on
a remote computer. Do not count on this literaly, though, as the job
may be scheduled on another computer or the local computer if : is in
the list.
=item B<--eof>[=I<eof-str>]
=item B<-e>[I<eof-str>]
@ -831,8 +840,7 @@ setting $TMPDIR.
=item B<-t>
Print the command line on the standard error output before executing
it.
Print the job to be run on standard error.
See also B<-v> and B<-p>.
@ -928,8 +936,8 @@ not need this option.
=item B<-v>
Verbose. Print the job to be run on STDOUT. Can be reversed with
B<--silent>. See also B<-t>.
Verbose. Print the job to be run on standard output. Can be reversed
with B<--silent>. See also B<-t>.
Use B<-v> B<-v> to print the wrapping ssh command when running remotely.

View file

@ -3,7 +3,7 @@
SERVER1=parallel-server3
SERVER2=parallel-server2
echo '### Test -M'
echo '### Test -M (--retries to avoid false errors)'
seq 1 30 | parallel -j5 -k -M -S $SERVER1,parallel@$SERVER2 echo
seq 1 30 | parallel -j10 -k -M -S $SERVER1,parallel@$SERVER2 echo
seq 1 30 | parallel -j5 --retries 3 -k -M -S $SERVER1,parallel@$SERVER2 echo
seq 1 30 | parallel -j10 --retries 3 -k -M -S $SERVER1,parallel@$SERVER2 echo

View file

@ -1,9 +1,10 @@
#!/bin/bash
# Test --nice
echo '### Test --nice locally'
parallel --nice 1 -vv 'PAR=a bash -c "echo \$PAR {}"' ::: b
echo '### Test --nice remote'
parallel --nice 1 -S .. -vv 'PAR=a bash -c "echo \$PAR {}"' ::: b
stdout parallel --nice 1 -S .. -vv 'PAR=a bash -c "echo \$PAR {}"' ::: b \
| perl -pe 's/\S*parallel-server\S*/one-server/'

View file

@ -12,3 +12,8 @@ echo '### Test --trc with >|< added in filename'
echo original > '/tmp/parallel space file'
echo '/tmp/parallel space file' | parallel --trc "{} >|<" -S $SERVER1 cat {} ">{}\\ \\>\\|\\<"
cat '/tmp/parallel space file >|<'
echo '### Test --return with fixed string (Gave undef warnings)'
touch a
echo a | stdout parallel --return b -S .. echo ">b" && echo OK
rm a b

View file

@ -1,2 +1,2 @@
### Test niceload
..........
.........

View file

@ -1,4 +1,4 @@
### Test -M
### Test -M (--retries to avoid false errors)
1
2
3

View file

@ -2,5 +2,5 @@
nice -n1 bash -c PAR=a\ bash\ -c\ \"echo\ \ \\\$PAR\ b\"
a b
### Test --nice remote
ssh parallel-server3 PARALLEL_SEQ=$PARALLEL_SEQ\;export PARALLEL_SEQ\;PARALLEL_PID=$PARALLEL_PID\;export PARALLEL_PID\; nice\ -n1\ bash\ -c\ PAR=a\\\ bash\\\ -c\\\ \\\"echo\\\ \\\ \\\\\\\$PAR\\\ b\\\";
ssh one-server PARALLEL_SEQ=$PARALLEL_SEQ\;export PARALLEL_SEQ\;PARALLEL_PID=$PARALLEL_PID\;export PARALLEL_PID\; nice\ -n1\ bash\ -c\ PAR=a\\\ bash\\\ -c\\\ \\\"echo\\\ \\\ \\\\\\\$PAR\\\ b\\\";
a b

View file

@ -2,3 +2,5 @@
original
### Test --trc with >|< added in filename
original
### Test --return with fixed string (Gave undef warnings)
OK