--wd . implemented. Passes testsuite.

This commit is contained in:
Ole Tange 2012-02-20 00:48:28 +00:00
parent d0509d0120
commit 3e996c9a57
17 changed files with 152 additions and 113 deletions

View file

@ -108,18 +108,9 @@ colsep = [sepchars]{no_of_sepchars}
# TODO max_line_length on remote
# TODO compute how many can be transferred within max_line_length
Postkort:
- Forside kun figur
- Bagside:
- Logo med figur - evt gnu.org/s/parallel
- kort grå tekst, der forklarer hvad det er.
- Eet eksempel: parallel gzip ::: *
- Link til video. http://nd.gd/0s
Til inspiration.
Hvis du stadig er ved at lave post- eller visitkort ting, så kunne du evt tilføje en QR code. Med MECARD tagget kan flere tags gemmes i en og samme fil:
Hvis du stadig er ved at lave post- eller visitkort ting, så kunne du evt tilføje en QR code under frimærket. Med MECARD tagget kan flere tags gemmes i en og samme fil:
qrencode -l L -o x.png "MECARD:N:GNU Parallel;EMAIL:parallel@gnu.org;URL:gnu.org/software/parallel;"
@ -131,8 +122,8 @@ Husk at skrive indholdet under billedet, det er irreterende at skulle gætte.
GNU parallel is a UNIX-tool for running commands in parallel.
To gzip all files running one job per CPU write:
parallel gzip ::: *
Watch the intro video to learn more: www.pi.dk/1
Or read more about GNU parallel: www.gnu.org/s/parallel
Watch the intro video to learn more: http://pi.dk/1
Or read more about GNU parallel: http://gnu.org/s/parallel
job->start():
$jobslot = Global::jobslot->$sshlogin
@ -198,6 +189,31 @@ src/sem src/niceload src/sql to a dir in your path.
wget http://git.savannah.gnu.org/cgit/parallel.git/plain/src/parallel
--record measured in lines (useful for fastq)
parallel --tag traceroute ::: pi.dk debian.org
# Thank you for watching
#
# If you like GNU Parallel:
# * Post this video on Reddit/Diaspora*/forums/blogs/
# Identi.ca/Google+/Twitter/Facebook/Linkedin/mailing lists
# * Join the mailing list https://lists.gnu.org/mailman/listinfo/parallel
# * Get the merchandise https://www.gnu.org/s/parallel/merchandise.html
# * Give a demo at your local user group
# * Request or write a review for your favourite blog or magazine
# * Request or build a package for your favourite distribution
# * Invite me for your next conference (Contact http://ole.tange.dk)
#
# If GNU Parallel saves you money:
# * (Have your company) donate to FSF https://my.fsf.org/donate/
#
# If you use GNU Parallel for a publication please cite:
# O. Tange (2011): GNU Parallel - The Command-Line Power Tool, ;login:
# The USENIX Magazine, February 2011:42-47.
#
# Find GNU Parallel at https://www.gnu.org/s/parallel/

View file

@ -172,53 +172,32 @@ cc:Sandro Cazzaniga <kharec@mandriva.org>,
Ryoichiro Suzuki <ryoichiro.suzuki@gmail.com>,
Jesse Alama <jesse.alama@gmail.com>
Subject: GNU Parallel 20120122 ('Dead SOPA') released
Subject: GNU Parallel 20120222 ('Whitney') released
GNU Parallel 20120122 ('Dead SOPA') has been released. It is
GNU Parallel 20120222 ('Whitney') has been released. It is
available for download at: http://ftp.gnu.org/gnu/parallel/
New in this release:
* --header : uses the first input line as column names and you can
then use {colname} as a replacement string in the command. This also
works with multiple :::'s.
* --workdir . will use the current working dir. If the current working
dir is beneath your home dir, the value . is treated as the relative
path to your home dir. This means that if your home dir is different
on remote computers (e.g. if your login is different) the relative
path will still be relative to your home dir.
* --header <regexp> matches a header as a regular expression and
repeats the header for each block with --pipe.
* A texinfo file is now generated from the POD file using pod2texi.
* --resume resumes from the last unfinished job. Useful if you stop
GNU Parallel and restart it later with the same arguments.
* The bioinformatics article "Fast large-scale clustering of protein
structures using Gauss integrals" mentions GNU Parallel. They forgot
to add the reference. Please remember --bibtex if you use GNU
Parallel in an article.
http://bioinformatics.oxfordjournals.org/content/28/4/510.short
* niceload now propagates exit status correctly.
* Show your support for GNU Parallel. For a limited time you can get a
GNU Parallel T-shirt+mug+pen+100 postcards at 20 EUR. See
* First supporter received his merchandise. Did you order yours?
https://www.gnu.org/software/parallel/merchandise.html
* Options -g -B -T -U -W -Y are retired as warned 6 months ago.
* GNU Parallel referenced in article on Holographic Grid Cloud. Thanks
to Stefano Gallozzi. http://arxiv.org/pdf/1112.6128
* Article in IEEE Software on GNU Parallel. Thanks to Diomidis
Spinellis. http://www.spinellis.gr/blog/20110911/
* An article on Narwhal which uses GNU Parallel. They forgot to add
the reference. Please remember --bibtex if you use GNU Parallel in
an article.
http://bioinformatics.oxfordjournals.org/content/early/2011/11/08/bioinformatics.btr613.full.pdf
* Blog post on using GNU Parallel to speed up BLAST queries:
http://blog.mckuhn.de/2012/01/embarrassingly-parallel-blast-search.html
* Video showing Wake-on-LAN with GNU Parallel.
https://www.youtube.com/watch?v=0mB-yIyKFLQ
* Using GNU Parallel with Solr.
http://sujitpal.blogspot.com/2011/12/solr-report-generation-with-python.html
* First job ad including GNU Parallel:
http://seeker.dice.com/jobsearch/servlet/JobSearch?op=101&dockey=xml/7/6/76f858de083a094f74b1a5d3ba53ffc5@endecaindex
* How to use GNU Parallel for vacuuming PostgreSQL tables.
http://blog.timmattison.com/archives/2012/01/24/mini-hack-parallel-vacuuming-in-postgresql/
* Bug fixes and man page updates.

View file

@ -543,7 +543,7 @@ sub get_options_from_array {
sub parse_options {
# Returns: N/A
# Defaults:
$Global::version = 20120124;
$Global::version = 20120215;
$Global::progname = 'parallel';
$Global::infinity = 2**31;
$Global::debug = 0;
@ -3446,15 +3446,41 @@ sub workdir {
if(not defined $self->{'workdir'}) {
my $workdir;
if(defined $::opt_workdir) {
if($::opt_workdir ne "...") {
if($::opt_workdir eq ".") {
# . means current dir
my $home = $ENV{'HOME'};
eval 'use Cwd';
my $cwd = cwd();
$::opt_workdir = $cwd;
if($home) {
# If homedir exists: remove the homedir from
# workdir if cwd starts with homedir
# E.g. /home/foo/my/dir => my/dir
# E.g. /tmp/my/dir => /tmp/my/dir
my ($home_dev, $home_ino) = (stat($home))[0,1];
my $parent = "";
my @dir_parts = split(m:/:,$cwd);
my $part;
while(defined ($part = shift @dir_parts)) {
$part eq "" and next;
$parent .= "/".$part;
my ($parent_dev, $parent_ino) = (stat($parent))[0,1];
if($parent_dev == $home_dev and $parent_ino == $home_ino) {
# dev and ino is the same: We found the homedir.
$::opt_workdir = join("/",@dir_parts);
last;
}
}
}
} elsif($::opt_workdir eq "...") {
$workdir = ".parallel/tmp/" . ::hostname() . "-" . $$
. "-" . $self->seq();
} else {
$workdir = $::opt_workdir;
# Rsync treats /./ special. We dont want that
$workdir =~ s:/\./:/:g; # Remove /./
$workdir =~ s:/+$::; # Remove ending / if any
$workdir =~ s:^\./::g; # Remove starting ./ if any
} else {
$workdir = ".parallel/tmp/" . ::hostname() . "-" . $$
. "-" . $self->seq();
}
} else {
$workdir = ".";

View file

@ -66,8 +66,9 @@ with the input.
If I<command> is given, GNU B<parallel> will behave similar to B<xargs>. If
I<command> is not given GNU B<parallel> will behave similar to B<cat | sh>.
The I<command> must be an executable, a script or a composed command: an
alias or a function will not work (see why
The I<command> must be an executable, a script, a composed command, or
a function. If it is a function you need to B<export -f> the function
first. An alias will, however, not work (see why
http://www.perlmonks.org/index.pl?node_id=484296).
@ -1327,9 +1328,17 @@ Print the version GNU B<parallel> and exit.
Files transferred using B<--transfer> and B<--return> will be relative
to I<mydir> on remote computers, and the command will be executed in
that dir. The special workdir B<...> will create a workdir in
B<~/.parallel/tmp/> on the remote computers and will be removed if
using B<--cleanup>.
the dir I<mydir>.
The special I<mydir> value B<...> will create working dirs under
B<~/.parallel/tmp/> on the remote computers. If B<--cleanup> is given
these dirs will be removed.
The special I<mydir> value B<.> uses the current working dir. If the
current working dir is beneath your home dir, the value B<.> is
treated as the relative path to your home dir. This means that if your
home dir is different on remote computers (e.g. if your login is
different) the relative path will still be relative to your home dir.
=item B<--wait>

View file

@ -77,8 +77,9 @@ with the input.
If @emph{command} is given, GNU @strong{parallel} will behave similar to @strong{xargs}. If
@emph{command} is not given GNU @strong{parallel} will behave similar to @strong{cat | sh}.
The @emph{command} must be an executable, a script or a composed command: an
alias or a function will not work (see why
The @emph{command} must be an executable, a script, a composed command, or
a function. If it is a function you need to @strong{export -f} the function
first. An alias will, however, not work (see why
http://www.perlmonks.org/index.pl?node_id=484296).
@item @strong{@{@}}
@ -1420,9 +1421,17 @@ Print the version GNU @strong{parallel} and exit.
Files transferred using @strong{--transfer} and @strong{--return} will be relative
to @emph{mydir} on remote computers, and the command will be executed in
that dir. The special workdir @strong{...} will create a workdir in
@strong{~/.parallel/tmp/} on the remote computers and will be removed if
using @strong{--cleanup}.
the dir @emph{mydir}.
The special @emph{mydir} value @strong{...} will create working dirs under
@strong{~/.parallel/tmp/} on the remote computers. If @strong{--cleanup} is given
these dirs will be removed.
The special @emph{mydir} value @strong{.} uses the current working dir. If the
current working dir is beneath your home dir, the value @strong{.} is
treated as the relative path to your home dir. This means that if your
home dir is different on remote computers (e.g. if your login is
different) the relative path will still be relative to your home dir.
@item @strong{--wait}
@anchor{@strong{--wait}}

View file

@ -5,19 +5,19 @@ SERVER2=parallel-server2
echo '### Test $PARALLEL - single line'
echo | PARALLEL=--number-of-cpus parallel
seq 1 2 | PARALLEL="-S$SERVER1 -Sssh\ -l\ parallel\ $SERVER2 -j1" parallel -kvv echo
seq 1 2 | PARALLEL="-Sparallel\@$SERVER1 -Sssh\ -l\ parallel\ $SERVER2 -j1" parallel -kvv echo
echo '### Test $PARALLEL - multi line'
seq 1 2 | PARALLEL="-S$SERVER1
seq 1 2 | PARALLEL="-Sparallel\@$SERVER1
-Sssh\ -l\ parallel\ $SERVER2
-j1" parallel -kvv echo
echo '### Test ~/.parallel/config - single line'
echo "-S$SERVER1 -Sssh\ -l\ parallel\ $SERVER2 -j1" > ~/.parallel/config
echo "-Sparallel\@$SERVER1 -Sssh\ -l\ parallel\ $SERVER2 -j1" > ~/.parallel/config
seq 1 2 | parallel -kvv echo
echo '### Test ~/.parallel/config - multi line'
echo "-S$SERVER1
echo "-Sparallel\@$SERVER1
-Sssh\ -l\ parallel\ $SERVER2
-j1" > ~/.parallel/config
seq 1 2 | parallel -kvv echo

View file

@ -2,17 +2,17 @@
#cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | nice timeout -k 1 40 parallel -j0 -k -L1
echo '### Test of --retries - it should run 13 jobs in total';
seq 0 12 | stdout parallel --progress -kj100% --retries 1 -S 12/localhost,1/:,parallel@server2 -vq \
seq 0 12 | stdout parallel --progress -kj100% --retries 1 -S 12/localhost,1/:,parallel@parallel-server1 -vq \
perl -e 'sleep 1;print "job{}\n";exit({})' |
perl -ne 'BEGIN{$/="\r";} @a=(split /\//,$_); END{print $a[1]+$a[4]+$a[7],"\n"}'
echo '### Test of --retries - it should run 25 jobs in total';
seq 0 12 | stdout parallel --progress -kj100% --retries 2 -S 12/localhost,1/:,parallel@server2 -vq \
seq 0 12 | stdout parallel --progress -kj100% --retries 2 -S 12/localhost,1/:,parallel@parallel-server1 -vq \
perl -e 'sleep 1;print "job{}\n";exit({})' |
perl -ne 'BEGIN{$/="\r";} @a=(split /\//,$_); END{print $a[1]+$a[4]+$a[7],"\n"}'
echo '### Test of --retries - it should run 49 jobs in total';
seq 0 12 | stdout parallel --progress -kj100% --retries 4 -S 12/localhost,1/:,parallel@server2 -vq \
seq 0 12 | stdout parallel --progress -kj100% --retries 4 -S 12/localhost,1/:,parallel@parallel-server1 -vq \
perl -e 'sleep 1;print "job{}\n";exit({})' |
perl -ne 'BEGIN{$/="\r";} @a=(split /\//,$_); END{print $a[1]+$a[4]+$a[7],"\n"}'
#EOF

View file

@ -7,10 +7,10 @@ echo '### Test $PARALLEL_SEQ - local'
seq 1 20 | parallel -kN2 echo arg1:{1} seq:'$'PARALLEL_SEQ arg2:{2}
echo '### Test $PARALLEL_SEQ - remote'
seq 1 20 | parallel -kN2 -S $SERVER1,parallel@$SERVER2 echo arg1:{1} seq:'$'PARALLEL_SEQ arg2:{2}
seq 1 20 | parallel -kN2 -S parallel@$SERVER1,parallel@$SERVER2 echo arg1:{1} seq:'$'PARALLEL_SEQ arg2:{2}
echo '### Test $PARALLEL_PID - local'
seq 1 20 | parallel -kN2 echo arg1:{1} pid:'$'PARALLEL_PID arg2:{2} | perl -pe 's/\d{3,}/0/g'
echo '### Test $PARALLEL_PID - remote'
seq 1 20 | parallel -kN2 -S $SERVER1,parallel@$SERVER2 echo arg1:{1} pid:'$'PARALLEL_PID arg2:{2} | perl -pe 's/\d{3,}/0/g'
seq 1 20 | parallel -kN2 -S parallel@$SERVER1,parallel@$SERVER2 echo arg1:{1} pid:'$'PARALLEL_PID arg2:{2} | perl -pe 's/\d{3,}/0/g'

View file

@ -27,7 +27,7 @@ PARALLEL="-k --jobs 1 echo 1" parallel -v echo 2 ::: a b c
echo '### Test ugly quoting from $PARALLEL'
PARALLEL="-k --jobs 1 perl -pe '\$a=1; print\$a'" parallel -v ::: <(echo a) <(echo b)
PARALLEL='-k --jobs 1 -S '$SERVER1' perl -pe "\\$a=1; print\\$a"' parallel -v '<(echo {})' ::: foo
PARALLEL='-k --jobs 1 -S parallel@'$SERVER1' perl -pe "\\$a=1; print\\$a"' parallel -v '<(echo {})' ::: foo
echo '### Test ugly quoting from profile file'
cat <<EOF >~/.parallel/test_profile
@ -36,36 +36,36 @@ cat <<EOF >~/.parallel/test_profile
EOF
parallel -v -J test_profile ::: <(echo a) <(echo b)
PARALLEL='-k --jobs 1 echo' parallel -S ssh\ $SERVER1\ ssh\ parallel@$SERVER2 -v ::: foo
PARALLEL='-k --jobs 1 perl -pe "\\$a=1; print \\$a"' parallel -S ssh\ $SERVER1\ ssh\ parallel@$SERVER2 -vv '<(echo {})' ::: foo
PARALLEL='-k --jobs 1 echo' parallel -S ssh\ parallel\@$SERVER1\ ssh\ parallel@$SERVER2 -v ::: foo
PARALLEL='-k --jobs 1 perl -pe "\\$a=1; print \\$a"' parallel -S ssh\ parallel\@$SERVER1\ ssh\ $SERVER2 -vv '<(echo {})' ::: foo
echo '### Test quoting of $ in command from profile file'
cat <<EOF >~/.parallel/test_profile
-k --jobs 1 perl -pe '\\\$a=1; print \\\$a'
EOF
parallel -v -J test_profile -S ssh\ $SERVER1\ ssh\ parallel@$SERVER2 '<(echo {})' ::: foo
parallel -v -J test_profile -S ssh\ parallel\@$SERVER1\ ssh\ $SERVER2 '<(echo {})' ::: foo
echo '### Test quoting of $ in command from $PARALLEL'
PARALLEL='-k --jobs 1 perl -pe "\\$a=1; print \\$a" ' parallel -S ssh\ $SERVER1\ ssh\ parallel@$SERVER2 -v '<(echo {})' ::: foo
PARALLEL='-k --jobs 1 perl -pe "\\$a=1; print \\$a" ' parallel -S ssh\ parallel\@$SERVER1\ ssh\ $SERVER2 -v '<(echo {})' ::: foo
echo '### Test quoting of space in arguments (-S) from profile file'
cat <<EOF >~/.parallel/test_profile
-k --jobs 1 -S ssh\ $SERVER1\ ssh\ parallel@$SERVER2 perl -pe '\$a=1; print \$a'
-k --jobs 1 -S ssh\ parallel\@$SERVER1\ ssh\ parallel@$SERVER2 perl -pe '\$a=1; print \$a'
EOF
parallel -v -J test_profile '<(echo {})' ::: foo
echo '### Test quoting of space in arguments (-S) from $PARALLEL'
PARALLEL='-k --jobs 1 -S ssh\ '$SERVER1'\ ssh\ parallel@'$SERVER2' perl -pe "\\$a=1; print \\$a" ' parallel -v '<(echo {})' ::: foo
PARALLEL='-k --jobs 1 -S ssh\ parallel@'$SERVER1'\ ssh\ parallel@'$SERVER2' perl -pe "\\$a=1; print \\$a" ' parallel -v '<(echo {})' ::: foo
echo '### Test quoting of space in long arguments (--sshlogin) from profile file'
cat <<EOF >~/.parallel/test_profile
# testprofile
-k --jobs 1 --sshlogin ssh\ $SERVER1\ ssh\ parallel@$SERVER2 perl -pe '\$a=1; print \$a'
-k --jobs 1 --sshlogin ssh\ parallel\@$SERVER1\ ssh\ parallel@$SERVER2 perl -pe '\$a=1; print \$a'
EOF
parallel -v -J test_profile '<(echo {})' ::: foo
echo '### Test quoting of space in arguments (-S) from $PARALLEL'
PARALLEL='-k --jobs 1 --sshlogin ssh\ '$SERVER1'\ ssh\ parallel@'$SERVER2' perl -pe "\\$a=1; print \\$a" ' parallel -v '<(echo {})' ::: foo
PARALLEL='-k --jobs 1 --sshlogin ssh\ parallel\@'$SERVER1'\ ssh\ parallel@'$SERVER2' perl -pe "\\$a=1; print \\$a" ' parallel -v '<(echo {})' ::: foo
echo '### Test merging of profiles - sort needed because -k only works on the single machine'
echo --tag > ~/.parallel/test_tag

View file

@ -5,5 +5,5 @@ SERVER2=parallel-server2
echo '### Test -M (--retries to avoid false errors)'
seq 1 30 | parallel -j5 --retries 3 -k -M -S $SERVER1,parallel@$SERVER2 echo 2>/dev/null
seq 1 30 | parallel -j10 --retries 3 -k -M -S $SERVER1,parallel@$SERVER2 echo 2>/dev/null
seq 1 30 | parallel -j5 --retries 3 -k -M -S parallel@$SERVER1,parallel@$SERVER2 echo 2>/dev/null
seq 1 30 | parallel -j10 --retries 3 -k -M -S parallel@$SERVER1,parallel@$SERVER2 echo 2>/dev/null

View file

@ -5,13 +5,13 @@ SERVER2=parallel-server2
echo '### Test --trc with space added in filename'
echo original > '/tmp/parallel space file'
echo '/tmp/parallel space file' | stdout parallel --trc "{} more space" -S $SERVER1 cat {} ">{}\\ more\\ space"
echo '/tmp/parallel space file' | stdout parallel --trc "{} more space" -S parallel@$SERVER1 cat {} ">{}\\ more\\ space"
cat '/tmp/parallel space file more space'
rm '/tmp/parallel space file more space'
echo '### Test --trc with >|< added in filename'
echo original > '/tmp/parallel space file'
echo '/tmp/parallel space file' | stdout parallel --trc "{} >|<" -S $SERVER1 cat {} ">{}\\ \\>\\|\\<"
echo '/tmp/parallel space file' | stdout parallel --trc "{} >|<" -S parallel@$SERVER1 cat {} ">{}\\ \\>\\|\\<"
cat '/tmp/parallel space file >|<'
rm '/tmp/parallel space file >|<'

View file

@ -5,7 +5,7 @@ SERVER2=parallel-server2
cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | parallel -j0 -k
echo '### Test --return of weirdly named file'
stdout parallel --return {} -vv -S $SERVER1 echo '>'{} ::: 'aa<${#}" b'; rm 'aa<${#}" b'
stdout parallel --return {} -vv -S parallel\@$SERVER1 echo '>'{} ::: 'aa<${#}" b'; rm 'aa<${#}" b'
echo '### Test if remote login shell is csh'
stdout parallel -k -vv -S csh@localhost 'echo $PARALLEL_PID $PARALLEL_SEQ {}| wc -w' ::: a b c

View file

@ -79,15 +79,15 @@ parallel: Warning: --cleanup ignored as there are no remote --sshlogin
10
### Check forced number of CPUs being respected
alpha
vh1
vh1
vh1
vh1
vh1
vh1
vh1
vh1
vh1
vm1
vm1
vm1
vm1
vm1
vm1
vm1
vm1
vm1
alpha
alpha
alpha

View file

@ -2,20 +2,20 @@
1
ssh -l parallel parallel-server2 'eval `echo $SHELL | grep -E "/(t)?csh" > /dev/null && echo setenv PARALLEL_SEQ '$PARALLEL_SEQ'\; setenv PARALLEL_PID '$PARALLEL_PID' || echo PARALLEL_SEQ='$PARALLEL_SEQ'\;export PARALLEL_SEQ\;PARALLEL_PID='$PARALLEL_PID'\;export PARALLEL_PID` ;' echo\ 1;
1
ssh parallel-server3 'eval `echo $SHELL | grep -E "/(t)?csh" > /dev/null && echo setenv PARALLEL_SEQ '$PARALLEL_SEQ'\; setenv PARALLEL_PID '$PARALLEL_PID' || echo PARALLEL_SEQ='$PARALLEL_SEQ'\;export PARALLEL_SEQ\;PARALLEL_PID='$PARALLEL_PID'\;export PARALLEL_PID` ;' echo\ 2;
ssh parallel\@parallel-server3 'eval `echo $SHELL | grep -E "/(t)?csh" > /dev/null && echo setenv PARALLEL_SEQ '$PARALLEL_SEQ'\; setenv PARALLEL_PID '$PARALLEL_PID' || echo PARALLEL_SEQ='$PARALLEL_SEQ'\;export PARALLEL_SEQ\;PARALLEL_PID='$PARALLEL_PID'\;export PARALLEL_PID` ;' echo\ 2;
2
### Test $PARALLEL - multi line
ssh -l parallel parallel-server2 'eval `echo $SHELL | grep -E "/(t)?csh" > /dev/null && echo setenv PARALLEL_SEQ '$PARALLEL_SEQ'\; setenv PARALLEL_PID '$PARALLEL_PID' || echo PARALLEL_SEQ='$PARALLEL_SEQ'\;export PARALLEL_SEQ\;PARALLEL_PID='$PARALLEL_PID'\;export PARALLEL_PID` ;' echo\ 1;
1
ssh parallel-server3 'eval `echo $SHELL | grep -E "/(t)?csh" > /dev/null && echo setenv PARALLEL_SEQ '$PARALLEL_SEQ'\; setenv PARALLEL_PID '$PARALLEL_PID' || echo PARALLEL_SEQ='$PARALLEL_SEQ'\;export PARALLEL_SEQ\;PARALLEL_PID='$PARALLEL_PID'\;export PARALLEL_PID` ;' echo\ 2;
ssh parallel\@parallel-server3 'eval `echo $SHELL | grep -E "/(t)?csh" > /dev/null && echo setenv PARALLEL_SEQ '$PARALLEL_SEQ'\; setenv PARALLEL_PID '$PARALLEL_PID' || echo PARALLEL_SEQ='$PARALLEL_SEQ'\;export PARALLEL_SEQ\;PARALLEL_PID='$PARALLEL_PID'\;export PARALLEL_PID` ;' echo\ 2;
2
### Test ~/.parallel/config - single line
ssh -l parallel parallel-server2 'eval `echo $SHELL | grep -E "/(t)?csh" > /dev/null && echo setenv PARALLEL_SEQ '$PARALLEL_SEQ'\; setenv PARALLEL_PID '$PARALLEL_PID' || echo PARALLEL_SEQ='$PARALLEL_SEQ'\;export PARALLEL_SEQ\;PARALLEL_PID='$PARALLEL_PID'\;export PARALLEL_PID` ;' echo\ 1;
1
ssh parallel-server3 'eval `echo $SHELL | grep -E "/(t)?csh" > /dev/null && echo setenv PARALLEL_SEQ '$PARALLEL_SEQ'\; setenv PARALLEL_PID '$PARALLEL_PID' || echo PARALLEL_SEQ='$PARALLEL_SEQ'\;export PARALLEL_SEQ\;PARALLEL_PID='$PARALLEL_PID'\;export PARALLEL_PID` ;' echo\ 2;
ssh parallel\@parallel-server3 'eval `echo $SHELL | grep -E "/(t)?csh" > /dev/null && echo setenv PARALLEL_SEQ '$PARALLEL_SEQ'\; setenv PARALLEL_PID '$PARALLEL_PID' || echo PARALLEL_SEQ='$PARALLEL_SEQ'\;export PARALLEL_SEQ\;PARALLEL_PID='$PARALLEL_PID'\;export PARALLEL_PID` ;' echo\ 2;
2
### Test ~/.parallel/config - multi line
ssh -l parallel parallel-server2 'eval `echo $SHELL | grep -E "/(t)?csh" > /dev/null && echo setenv PARALLEL_SEQ '$PARALLEL_SEQ'\; setenv PARALLEL_PID '$PARALLEL_PID' || echo PARALLEL_SEQ='$PARALLEL_SEQ'\;export PARALLEL_SEQ\;PARALLEL_PID='$PARALLEL_PID'\;export PARALLEL_PID` ;' echo\ 1;
1
ssh parallel-server3 'eval `echo $SHELL | grep -E "/(t)?csh" > /dev/null && echo setenv PARALLEL_SEQ '$PARALLEL_SEQ'\; setenv PARALLEL_PID '$PARALLEL_PID' || echo PARALLEL_SEQ='$PARALLEL_SEQ'\;export PARALLEL_SEQ\;PARALLEL_PID='$PARALLEL_PID'\;export PARALLEL_PID` ;' echo\ 2;
ssh parallel\@parallel-server3 'eval `echo $SHELL | grep -E "/(t)?csh" > /dev/null && echo setenv PARALLEL_SEQ '$PARALLEL_SEQ'\; setenv PARALLEL_PID '$PARALLEL_PID' || echo PARALLEL_SEQ='$PARALLEL_SEQ'\;export PARALLEL_SEQ\;PARALLEL_PID='$PARALLEL_PID'\;export PARALLEL_PID` ;' echo\ 2;
2

View file

@ -37,7 +37,7 @@ perl -pe '$a=1; print $a' /dev/fd/62
1b
echo foo
foo
ssh parallel-server3 ssh parallel@parallel-server2 'eval `echo $SHELL | grep -E "/(t)?csh" > /dev/null && echo setenv PARALLEL_SEQ '$PARALLEL_SEQ'\; setenv PARALLEL_PID '$PARALLEL_PID' || echo PARALLEL_SEQ='$PARALLEL_SEQ'\;export PARALLEL_SEQ\;PARALLEL_PID='$PARALLEL_PID'\;export PARALLEL_PID` ;' perl\ -pe\ \"\\\$a=1\;\ print\ \\\$a\"\ \<\(echo\ foo\);
ssh parallel@parallel-server3 ssh parallel-server2 'eval `echo $SHELL | grep -E "/(t)?csh" > /dev/null && echo setenv PARALLEL_SEQ '$PARALLEL_SEQ'\; setenv PARALLEL_PID '$PARALLEL_PID' || echo PARALLEL_SEQ='$PARALLEL_SEQ'\;export PARALLEL_SEQ\;PARALLEL_PID='$PARALLEL_PID'\;export PARALLEL_PID` ;' perl\ -pe\ \"\\\$a=1\;\ print\ \\\$a\"\ \<\(echo\ foo\);
1foo
### Test quoting of $ in command from profile file
perl -pe '$a=1; print $a' <(echo foo)

View file

@ -50,16 +50,16 @@
3
3
### Test --nonall
vh1
vh2.pi.dk
vm1
vm10
### Test --nonall -u
vh2.pi.dk
vh1
vh2.pi.dk
vh1
vm10
vm1
vm10
vm1
### Test read sshloginfile from STDIN
vh1
vh1
vm1
vm1
### Test --nonall --basefile
/tmp/nonall--basefile
/tmp/nonall--basefile

View file

@ -1,5 +1,5 @@
### Test --return of weirdly named file
ssh parallel-server3 'eval `echo $SHELL | grep -E "/(t)?csh" > /dev/null && echo setenv PARALLEL_SEQ '$PARALLEL_SEQ'\; setenv PARALLEL_PID '$PARALLEL_PID' || echo PARALLEL_SEQ='$PARALLEL_SEQ'\;export PARALLEL_SEQ\;PARALLEL_PID='$PARALLEL_PID'\;export PARALLEL_PID` ;' echo\ \>aa\\\<\\\$\\\{\\\#\\\}\\\"\\\ b;_EXIT_status=$?; rsync -rlDzR -essh parallel-server3:././aa\\\<\\\$\\\{\\\#\\\}\\\"\\\ b ./; exit $_EXIT_status;
ssh parallel@parallel-server3 'eval `echo $SHELL | grep -E "/(t)?csh" > /dev/null && echo setenv PARALLEL_SEQ '$PARALLEL_SEQ'\; setenv PARALLEL_PID '$PARALLEL_PID' || echo PARALLEL_SEQ='$PARALLEL_SEQ'\;export PARALLEL_SEQ\;PARALLEL_PID='$PARALLEL_PID'\;export PARALLEL_PID` ;' echo\ \>aa\\\<\\\$\\\{\\\#\\\}\\\"\\\ b;_EXIT_status=$?; rsync -rlDzR -essh parallel@parallel-server3:././aa\\\<\\\$\\\{\\\#\\\}\\\"\\\ b ./; exit $_EXIT_status;
### Test if remote login shell is csh
ssh csh@localhost 'eval `echo $SHELL | grep -E "/(t)?csh" > /dev/null && echo setenv PARALLEL_SEQ '$PARALLEL_SEQ'\; setenv PARALLEL_PID '$PARALLEL_PID' || echo PARALLEL_SEQ='$PARALLEL_SEQ'\;export PARALLEL_SEQ\;PARALLEL_PID='$PARALLEL_PID'\;export PARALLEL_PID` ;' echo\ \$PARALLEL_PID\ \$PARALLEL_SEQ\ a\|\ wc\ -w;
3