mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-25 23:47:53 +00:00
env_parallel.tcsh added.
env_parallel.csh now supports variables, aliases, and arrays with no special chars.
This commit is contained in:
parent
61dca99762
commit
16e3e54dcf
|
@ -266,6 +266,8 @@ for Big Data Applications https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumb
|
|||
|
||||
* FaceCrop uses GNU Parallel: https://github.com/EderSantana/FaceCrop
|
||||
|
||||
* GNU parallel 應用範例 http://staypython.blogspot.dk/2016/04/gnu-parallel.html
|
||||
|
||||
* Bug fixes and man page updates.
|
||||
|
||||
GNU Parallel - For people who live life in the parallel lane.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
bin_SCRIPTS = parallel sql niceload \
|
||||
env_parallel env_parallel.bash env_parallel.zsh env_parallel.fish \
|
||||
env_parallel.ksh env_parallel.pdksh env_parallel.csh
|
||||
env_parallel.ksh env_parallel.pdksh env_parallel.csh env_parallel.tcsh
|
||||
|
||||
install-exec-hook:
|
||||
rm $(DESTDIR)$(bindir)/sem || true
|
||||
|
@ -179,7 +179,7 @@ DISTCLEANFILES = parallel.1 env_parallel.1 sem.1 sql.1 niceload.1 \
|
|||
|
||||
EXTRA_DIST = parallel sem sql niceload env_parallel \
|
||||
env_parallel.bash env_parallel.zsh env_parallel.fish env_parallel.ksh \
|
||||
env_parallel.pdksh env_parallel.csh \
|
||||
env_parallel.pdksh env_parallel.csh env_parallel.tcsh \
|
||||
sem.pod parallel.pod env_parallel.pod niceload.pod parallel_tutorial.pod \
|
||||
parallel_design.pod \
|
||||
$(DISTCLEANFILES)
|
||||
|
|
|
@ -219,7 +219,7 @@ top_builddir = @top_builddir@
|
|||
top_srcdir = @top_srcdir@
|
||||
bin_SCRIPTS = parallel sql niceload \
|
||||
env_parallel env_parallel.bash env_parallel.zsh env_parallel.fish \
|
||||
env_parallel.ksh env_parallel.pdksh env_parallel.csh
|
||||
env_parallel.ksh env_parallel.pdksh env_parallel.csh env_parallel.tcsh
|
||||
|
||||
@DOCUMENTATION_TRUE@man_MANS = parallel.1 env_parallel.1 sem.1 sql.1 niceload.1 \
|
||||
@DOCUMENTATION_TRUE@ parallel_tutorial.7 parallel_design.7
|
||||
|
@ -242,7 +242,7 @@ DISTCLEANFILES = parallel.1 env_parallel.1 sem.1 sql.1 niceload.1 \
|
|||
|
||||
EXTRA_DIST = parallel sem sql niceload env_parallel \
|
||||
env_parallel.bash env_parallel.zsh env_parallel.fish env_parallel.ksh \
|
||||
env_parallel.pdksh env_parallel.csh \
|
||||
env_parallel.pdksh env_parallel.csh env_parallel.tcsh \
|
||||
sem.pod parallel.pod env_parallel.pod niceload.pod parallel_tutorial.pod \
|
||||
parallel_design.pod \
|
||||
$(DISTCLEANFILES)
|
||||
|
|
|
@ -46,7 +46,11 @@ pdksh: Put this in $HOME/.profile: source `which env_parallel.pdksh`
|
|||
|
||||
csh: Put this in $HOME/.cshrc: source `which env_parallel.csh`
|
||||
E.g. by doing: echo 'source `which env_parallel.csh`' >> $HOME/.cshrc
|
||||
Supports: aliases
|
||||
Supports: aliases, variables, arrays with no special chars
|
||||
|
||||
tcsh: Put this in $HOME/.tcshrc: source `which env_parallel.tcsh`
|
||||
E.g. by doing: echo 'source `which env_parallel.tcsh`' >> $HOME/.tcshrc
|
||||
Supports: aliases, variables, arrays with no special chars
|
||||
|
||||
For details: see man env_parallel
|
||||
|
||||
|
|
|
@ -25,4 +25,70 @@
|
|||
# or write to the Free Software Foundation, Inc., 51 Franklin St,
|
||||
# Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
alias env_parallel 'setenv PARALLEL_ENV "`alias | perl -pe s/\\047/\\047\\042\\047\\042\\047/g\;s/\^\(\\S+\)\(\\s+\)\\\(\(.\*\)\\\)/\\1\\2\\3/\;s/\^\(\\S+\)\(\\s+\)\(.\*\)/\\1\\2\\047\\3\\047/\;s/\^/\\001alias\ /\;s/\\\!/\\\\\\\!/g;`";parallel \!*; setenv PARALLEL_ENV'
|
||||
if ("`alias env_parallel`" == '') then
|
||||
# Activate alias
|
||||
alias env_parallel 'setenv PARALLEL "\!*"; source `which env_parallel.csh`'
|
||||
else
|
||||
# Get the scalar and array variable names
|
||||
set _vARnAmES=(`set | awk -e '{print $1}' |grep -v prompt2`)
|
||||
|
||||
# Make a tmpfile for the variable definitions
|
||||
set _tMpvARfILe=`tempfile`
|
||||
|
||||
# Make a tmpfile for the variable definitions + alias
|
||||
set _tMpaLLfILe=`tempfile`
|
||||
foreach _vARnAmE ($_vARnAmES);
|
||||
# if $?myvar && $#myvar <= 1 echo scalar_myvar=$var
|
||||
eval if'($?'$_vARnAmE' && ${#'$_vARnAmE'} <= 1) echo scalar_'$_vARnAmE'="$'$_vARnAmE'"' >> $_tMpvARfILe;
|
||||
# if $?myvar && $#myvar > 1 echo array_myvar=$var
|
||||
eval if'($?'$_vARnAmE' && ${#'$_vARnAmE'} > 1) echo array_'$_vARnAmE'="$'$_vARnAmE'"' >> $_tMpvARfILe;
|
||||
end
|
||||
|
||||
# shell quote variables (--plain needed due to $PARALLEL abuse)
|
||||
# Convert 'scalar_myvar=...' to 'set myvar=...'
|
||||
# Convert 'array_myvar=...' to 'set array=(...)'
|
||||
cat $_tMpvARfILe | parallel --plain --shellquote | perl -pe 's/^scalar_(\S+).=/set $1=/ or s/^array_(\S+).=(.*)/set $1=($2)/ && s/\\ / /g;' > $_tMpaLLfILe
|
||||
|
||||
# Cleanup
|
||||
rm $_tMpvARfILe; unset _tMpvARfILe _vARnAmE _vARnAmES
|
||||
|
||||
# ALIAS TO EXPORT ALIASES:
|
||||
|
||||
# Quote ' by putting it inside "
|
||||
# s/'/'"'"'/g;
|
||||
# ' => \047 " => \042
|
||||
# s/\047/\047\042\047\042\047/g;
|
||||
# Quoted: s/\\047/\\047\\042\\047\\042\\047/g\;
|
||||
|
||||
# Remove () from second column
|
||||
# s/^(\S+)(\s+)\((.*)\)/\1\2\3/
|
||||
# \047 => '
|
||||
# s/^(\S+)(\s+)\((.*)\)/\1\2\3/;
|
||||
# Quoted: s/\^\(\\S+\)\(\\s+\)\\\(\(.\*\)\\\)/\\1\\2\\3/\;
|
||||
|
||||
# Add ' around second column
|
||||
# s/^(\S+)(\s+)(.*)/\1\2'\3'/
|
||||
# \047 => '
|
||||
# s/^(\S+)(\s+)(.*)/\1\2\047\3\047/;
|
||||
# Quoted: s/\^\(\\S+\)\(\\s+\)\(.\*\)/\\1\\2\\047\\3\\047/\;
|
||||
|
||||
# Quote ! as \!
|
||||
# s/\!/\\\!/g;
|
||||
# Quoted: s/\\\!/\\\\\\\!/g;
|
||||
|
||||
# Prepend with "\nalias "
|
||||
# s/^/\001alias /;
|
||||
# Quoted: s/\^/\\001alias\ /\;
|
||||
alias | perl -pe s/\\047/\\047\\042\\047\\042\\047/g\;s/\^\(\\S+\)\(\\s+\)\\\(\(.\*\)\\\)/\\1\\2\\3/\;s/\^\(\\S+\)\(\\s+\)\(.\*\)/\\1\\2\\047\\3\\047/\;s/\^/\\001alias\ /\;s/\\\!/\\\\\\\!/g >> $_tMpaLLfILe
|
||||
|
||||
setenv PARALLEL_ENV "`cat $_tMpaLLfILe; rm $_tMpaLLfILe`";
|
||||
unset _tMpaLLfILe;
|
||||
# Use $PARALLEL set in calling alias
|
||||
parallel
|
||||
setenv PARALLEL_ENV
|
||||
setenv PARALLEL
|
||||
endif
|
||||
|
||||
# Tested working for aliases
|
||||
# alias env_parallel 'setenv PARALLEL_ENV "`alias | perl -pe s/\\047/\\047\\042\\047\\042\\047/g\;s/\^\(\\S+\)\(\\s+\)\\\(\(.\*\)\\\)/\\1\\2\\3/\;s/\^\(\\S+\)\(\\s+\)\(.\*\)/\\1\\2\\047\\3\\047/\;s/\^/\\001alias\ /\;s/\\\!/\\\\\\\!/g;`";parallel \!*; setenv PARALLEL_ENV'
|
||||
|
||||
|
|
|
@ -75,6 +75,8 @@ function env_parallel
|
|||
$val=~s/'"'"'/\\\$&/go;
|
||||
# Quote newline as '\n'
|
||||
$val =~ s/[\n]/\\\n/go;
|
||||
# Empty => 2 single quotes = \047\047
|
||||
$val=~s/^$/\047\047/o;
|
||||
if($name ne $last and $last) {
|
||||
# The $name is different, so this is a new variable.
|
||||
# Print the last one.
|
||||
|
|
|
@ -243,6 +243,9 @@ E.g. by doing:
|
|||
|
||||
=head2 csh
|
||||
|
||||
B<env_parallel> for B<csh> breaks B<$PARALLEL>, so do not use
|
||||
B<$PARALLEL>.
|
||||
|
||||
Installation
|
||||
|
||||
Put this in $HOME/.cshrc:
|
||||
|
@ -267,15 +270,21 @@ Not supported by B<csh>.
|
|||
|
||||
=item variables
|
||||
|
||||
Not supported
|
||||
set myvar=test
|
||||
env_parallel echo "\$myvar" ::: test
|
||||
env_parallel -S csh@server echo "\$myvar" ::: test
|
||||
|
||||
=item arrays
|
||||
|
||||
Not supported
|
||||
=item arrays with no special chars
|
||||
|
||||
set myarray=(foo bar baz)
|
||||
env_parallel echo "\${myarray\[\{\}\]}" ::: 1 2 3
|
||||
env_parallel -S csh@server echo "\${myarray\[\{\}\]}" ::: 1 2 3
|
||||
|
||||
=back
|
||||
|
||||
|
||||
|
||||
=head1 EXIT STATUS
|
||||
|
||||
Same as GNU B<parallel>.
|
||||
|
|
94
src/env_parallel.tcsh
Executable file
94
src/env_parallel.tcsh
Executable file
|
@ -0,0 +1,94 @@
|
|||
#!/bin/csh
|
||||
|
||||
# This file must be sourced in csh:
|
||||
#
|
||||
# source `which env_parallel.csh`
|
||||
#
|
||||
# after which 'env_parallel' works
|
||||
#
|
||||
#
|
||||
# Copyright (C) 2016
|
||||
# Ole Tange and Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, see <http://www.gnu.org/licenses/>
|
||||
# or write to the Free Software Foundation, Inc., 51 Franklin St,
|
||||
# Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
if ("`alias env_parallel`" == '') then
|
||||
# Activate alias
|
||||
## alias env_parallel 'setenv PARALLEL "\!*"; source `which env_parallel.csh`'
|
||||
alias env_parallel 'setenv PARALLEL "\!*"; source /tmp/env_parallel.csh'
|
||||
else
|
||||
# Get the scalar and array variable names
|
||||
set _vARnAmES=(`set | awk -e '{print $1}' |grep -vE '^(_|killring|prompt2)$'`)
|
||||
|
||||
# Make a tmpfile for the variable definitions
|
||||
set _tMpvARfILe=`tempfile`
|
||||
|
||||
# Make a tmpfile for the variable definitions + alias
|
||||
set _tMpaLLfILe=`tempfile`
|
||||
foreach _vARnAmE ($_vARnAmES);
|
||||
# if $?myvar && $#myvar <= 1 echo scalar_myvar=$var
|
||||
eval if'($?'$_vARnAmE' && ${#'$_vARnAmE'} <= 1) echo scalar_'$_vARnAmE'=\"'\"\$$_vARnAmE\"'\"' >> $_tMpvARfILe;
|
||||
# if $?myvar && $#myvar > 1 echo array_myvar=$var
|
||||
eval if'($?'$_vARnAmE' && ${#'$_vARnAmE'} > 1) echo array_'$_vARnAmE'="$'$_vARnAmE'"' >> $_tMpvARfILe;
|
||||
end
|
||||
|
||||
# shell quote variables (--plain needed due to $PARALLEL abuse)
|
||||
# Convert 'scalar_myvar=...' to 'set myvar=...'
|
||||
# Convert 'array_myvar=...' to 'set array=(...)'
|
||||
cat $_tMpvARfILe | parallel --plain --shellquote | perl -pe 's/^scalar_(\S+).=/set $1=/ or s/^array_(\S+).=(.*)/set $1=($2)/ && s/\\ / /g;' > $_tMpaLLfILe
|
||||
# Cleanup
|
||||
rm $_tMpvARfILe; unset _tMpvARfILe _vARnAmE _vARnAmES
|
||||
|
||||
# ALIAS TO EXPORT ALIASES:
|
||||
|
||||
# Quote ' by putting it inside "
|
||||
# s/'/'"'"'/g;
|
||||
# ' => \047 " => \042
|
||||
# s/\047/\047\042\047\042\047/g;
|
||||
# Quoted: s/\\047/\\047\\042\\047\\042\\047/g\;
|
||||
|
||||
# Remove () from second column
|
||||
# s/^(\S+)(\s+)\((.*)\)/\1\2\3/
|
||||
# \047 => '
|
||||
# s/^(\S+)(\s+)\((.*)\)/\1\2\3/;
|
||||
# Quoted: s/\^\(\\S+\)\(\\s+\)\\\(\(.\*\)\\\)/\\1\\2\\3/\;
|
||||
|
||||
# Add ' around second column
|
||||
# s/^(\S+)(\s+)(.*)/\1\2'\3'/
|
||||
# \047 => '
|
||||
# s/^(\S+)(\s+)(.*)/\1\2\047\3\047/;
|
||||
# Quoted: s/\^\(\\S+\)\(\\s+\)\(.\*\)/\\1\\2\\047\\3\\047/\;
|
||||
|
||||
# Quote ! as \!
|
||||
# s/\!/\\\!/g;
|
||||
# Quoted: s/\\\!/\\\\\\\!/g;
|
||||
|
||||
# Prepend with "\nalias "
|
||||
# s/^/\001alias /;
|
||||
# Quoted: s/\^/\\001alias\ /\;
|
||||
alias | perl -pe s/\\047/\\047\\042\\047\\042\\047/g\;s/\^\(\\S+\)\(\\s+\)\\\(\(.\*\)\\\)/\\1\\2\\3/\;s/\^\(\\S+\)\(\\s+\)\(.\*\)/\\1\\2\\047\\3\\047/\;s/\^/\\001alias\ /\;s/\\\!/\\\\\\\!/g >> $_tMpaLLfILe
|
||||
|
||||
setenv PARALLEL_ENV "`cat $_tMpaLLfILe; rm $_tMpaLLfILe`";
|
||||
unset _tMpaLLfILe;
|
||||
# Use $PARALLEL set in calling alias
|
||||
parallel
|
||||
setenv PARALLEL_ENV
|
||||
setenv PARALLEL
|
||||
endif
|
||||
|
||||
# Tested working for aliases
|
||||
# alias env_parallel 'setenv PARALLEL_ENV "`alias | perl -pe s/\\047/\\047\\042\\047\\042\\047/g\;s/\^\(\\S+\)\(\\s+\)\\\(\(.\*\)\\\)/\\1\\2\\3/\;s/\^\(\\S+\)\(\\s+\)\(.\*\)/\\1\\2\\047\\3\\047/\;s/\^/\\001alias\ /\;s/\\\!/\\\\\\\!/g;`";parallel \!*; setenv PARALLEL_ENV'
|
||||
|
|
@ -6865,7 +6865,7 @@ sub wrapped {
|
|||
$command = "perl -e ".
|
||||
::shell_quote_scalar(base64_eval())." ".
|
||||
join(" ", ::shell_quote(
|
||||
string_base64('exec "'.
|
||||
string_base64("exec \"$Global::shell\",'-c',\"".
|
||||
::perl_quote_scalar($command).'"')));
|
||||
}
|
||||
$self->{'wrapped'} = $command;
|
||||
|
|
|
@ -50,6 +50,82 @@ Fixing the problem in B<csh> often breaks it in B<bash>. In these
|
|||
cases the fix is often to use a small Perl script and call that.
|
||||
|
||||
|
||||
=head2 env_parallel
|
||||
|
||||
B<env_parallel> is a dummy shell script that will run if
|
||||
B<env_parallel> is not an alias or a function and tell the user how to
|
||||
activate the alias/function for the supported shells.
|
||||
|
||||
The alias or function will copy the current environment and run the
|
||||
command with GNU B<parallel> in the copy of the environment.
|
||||
|
||||
The problem is that you cannot access all of the current environment
|
||||
inside Perl. E.g. aliases, functions and unexported shell variables.
|
||||
|
||||
The idea is therefore to take the environment and put it in
|
||||
B<$PARALLEL_ENV> which GNU B<parallel> prepends to every command.
|
||||
|
||||
The only way to have access to the environment is directly from the
|
||||
shell, so the program must be written in a shell script that will be
|
||||
sourced and there has to deal with the dialect of the relevant shell.
|
||||
|
||||
Dumping the environment into a format that can be activated again is
|
||||
easy in Bash: B<typeset> and B<alias> basically give you the commands
|
||||
you must run to re-create the environment. It is much harder in B<csh>
|
||||
where there is no easy way to convert an environment into commands
|
||||
that generate the environment.
|
||||
|
||||
|
||||
=head3 env_parallel.bash / env_parallel.zsh / env_parallel.ksh / env_parallel.pdksh
|
||||
|
||||
B<env_parallel.(bash|ksh|pdksh|zsh)> sets the function B<env_parallel>. It uses
|
||||
B<alias> and B<typeset> to dump the configuration (with a few
|
||||
exceptions) into B<$PARALLEL_ENV> before running GNU B<parallel>.
|
||||
|
||||
After GNU B<parallel> is finished, B<$PARALLEL_ENV> is deleted.
|
||||
|
||||
|
||||
=head3 env_parallel.csh
|
||||
|
||||
B<env_parallel.csh> has two purposes: If B<env_parallel> is not an
|
||||
alias: make it into an alias that sets B<$PARALLEL> with arguments
|
||||
and calls B<env_parallel.csh>.
|
||||
|
||||
If B<env_parallel> is an alias, then B<env_parallel.csh> uses
|
||||
B<$PARALLEL> as the arguments for GNU B<parallel>.
|
||||
|
||||
It exports the environment by writing a variable definition to a file
|
||||
for each variable. The definitions of aliases are appended to this
|
||||
file. Finally the file is put into B<$PARALLEL_ENV>.
|
||||
|
||||
GNU B<parallel> is then run and B<$PARALLEL_ENV> is deleted.
|
||||
|
||||
|
||||
=head3 env_parallel.fish
|
||||
|
||||
First all functions definitions are generated using a loop and
|
||||
B<functions>.
|
||||
|
||||
Dumping the scalar variable definitions is harder.
|
||||
|
||||
B<fish> can represent non-printable characters in (at least) 2
|
||||
ways. To avoid problems all scalars are converted to \XX quoting.
|
||||
|
||||
Then commands to generate the definitions are made and separated by
|
||||
NUL.
|
||||
|
||||
This is then piped into a Perl script that quotes all values. List
|
||||
elements will be appended using two spaces.
|
||||
|
||||
Finally \n is converted into \1 because B<fish> variables cannot
|
||||
contain \n. GNU B<parallel> will later convert all \1 from
|
||||
B<$PARALLEL_ENV> into \n.
|
||||
|
||||
This is then all saved in B<$PARALLEL_ENV>.
|
||||
|
||||
GNU B<parallel> is called, and B<$PARALLEL_ENV> is deleted.
|
||||
|
||||
|
||||
=head2 Job slots
|
||||
|
||||
The easiest way to explain what GNU B<parallel> does is to assume that
|
||||
|
@ -64,10 +140,11 @@ been implemented as a stack with lazy evaluation: Draw one from an
|
|||
empty stack and the stack is extended by one. When a job is done, push
|
||||
the available job slot back on the stack.
|
||||
|
||||
This implementation also means that if you use remote executions, you
|
||||
cannot assume that a given job slot will remain on the same remote
|
||||
server. This goes double since number of job slots can be adjusted on
|
||||
the fly (by giving B<--jobs> a file name).
|
||||
This implementation also means that if you re-run the same jobs, you
|
||||
cannot assume jobs will get the same slots. And if you use remote
|
||||
executions, you cannot assume that a given job slot will remain on the
|
||||
same remote server. This goes double since number of job slots can be
|
||||
adjusted on the fly (by giving B<--jobs> a file name).
|
||||
|
||||
|
||||
=head2 Rsync protocol version
|
||||
|
@ -84,12 +161,13 @@ B<rsync>s to talk to version 2.5.7.
|
|||
|
||||
=head2 Compression
|
||||
|
||||
B<--compress> compresses the data in the temporary files. This is a
|
||||
bit tricky because there should be no files to clean up if GNU
|
||||
B<parallel> is killed by a power outage.
|
||||
GNU B<parallel> buffers output in temporary files. B<--compress>
|
||||
compresses the buffered data. This is a bit tricky because there
|
||||
should be no files to clean up if GNU B<parallel> is killed by a power
|
||||
outage.
|
||||
|
||||
GNU B<parallel> first selects a compression program. If the user has not
|
||||
selected one, the first of these that are in $PATH is used: B<lz4 pigz
|
||||
selected one, the first of these that is in $PATH is used: B<lz4 pigz
|
||||
lzop plzip pbzip2 pxz gzip lzma xz bzip2 lzip>. They are sorted by
|
||||
speed on a 16 core machine.
|
||||
|
||||
|
@ -133,16 +211,17 @@ Local: B<setpriority(0,0,$nice)>
|
|||
|
||||
=item --cat
|
||||
|
||||
cat > {}; I<input> {};
|
||||
cat > {}; <<command>> {};
|
||||
perl -e '$bash = shift;
|
||||
$csh = shift;
|
||||
for(@ARGV) { unlink;rmdir; }
|
||||
if($bash =~ s/h//) { exit $bash; }
|
||||
exit $csh;' "$?h" "$status" {};
|
||||
|
||||
{} is set to $PARALLEL_TMP which is a tmpfile. The Perl script saves
|
||||
the exit value, unlinks the tmpfile, and returns the exit value - no
|
||||
matter if the shell is B<bash> (using $?) or B<*csh> (using $status).
|
||||
{} is set to B<$PARALLEL_TMP> which is a tmpfile. The Perl script
|
||||
saves the exit value, unlinks the tmpfile, and returns the exit value
|
||||
- no matter if the shell is B<bash>/B<ksh>/B<zsh> (using $?) or
|
||||
B<*csh>/B<fish> (using $status).
|
||||
|
||||
=item --fifo
|
||||
|
||||
|
@ -161,35 +240,38 @@ matter if the shell is B<bash> (using $?) or B<*csh> (using $status).
|
|||
waitpid $pid,0;
|
||||
# Cleanup
|
||||
unlink $f;
|
||||
exit $?/256;' I<shell> I<input> $PARALLEL_TMP
|
||||
exit $?/256;' <<shell>> -c <<command>> $PARALLEL_TMP
|
||||
|
||||
This is an elaborate way of: mkfifo {}; run I<input> in the
|
||||
background using I<shell>; copying STDIN to {}; waiting for background
|
||||
to complete; remove {} and exit with the exit code from I<input>.
|
||||
This is an elaborate way of: mkfifo {}; run I<<<command>>> in the
|
||||
background using I<<<shell>>>; copying STDIN to {}; waiting for background
|
||||
to complete; remove {} and exit with the exit code from I<<<command>>>.
|
||||
|
||||
It is made this way to be compatible with B<*csh>.
|
||||
It is made this way to be compatible with B<*csh>/B<fish>.
|
||||
|
||||
=item --pipepart
|
||||
|
||||
< file perl -e 'while(@ARGV) {
|
||||
< <<file>> perl -e 'while(@ARGV) {
|
||||
sysseek(STDIN,shift,0) || die;
|
||||
$left = shift;
|
||||
while($read = sysread(STDIN,$buf, ($left > 131072 ? 131072 : $left))){
|
||||
$left -= $read;
|
||||
syswrite(STDOUT,$buf);
|
||||
}
|
||||
}' startposition length
|
||||
}' <<startposition>> <<length>>
|
||||
|
||||
This will read I<length> bytes from I<file> starting at
|
||||
I<startposition> and send it to STDOUT.
|
||||
This will read I<<<length>>> bytes from I<<<file>>> starting at
|
||||
I<<<startposition>>> and send it to STDOUT.
|
||||
|
||||
=item --sshlogin I<sln>
|
||||
|
||||
ssh I<sln> I<shell quoted input>
|
||||
ssh I<sln> I<shell quoted command>
|
||||
|
||||
Where I<sln> is the sshlogin and I<shell quoted command> is the
|
||||
command quoted so it will be passed to the server.
|
||||
|
||||
=item --transfer
|
||||
|
||||
( ssh I<sln> mkdir -p ./I<workdir>;rsync --protocol 30 -rlDzR -essh ./{} I<sln>:./I<workdir> ); I<input>
|
||||
( ssh I<sln> mkdir -p ./I<workdir>;rsync --protocol 30 -rlDzR -essh ./{} I<sln>:./I<workdir> ); I<<<command>>>
|
||||
|
||||
Read about B<--protocol 30> in the section B<Rsync protocol version>.
|
||||
|
||||
|
@ -203,7 +285,7 @@ Read about B<--protocol 30> in the section B<Rsync protocol version>.
|
|||
|
||||
=item --return I<file>
|
||||
|
||||
I<input>; _EXIT_status=$?; mkdir -p I<workdir>; rsync --protocol 30 --rsync-path=cd\ ./I<workdir>\;\ rsync -rlDzR -essh I<sln>:./I<file> ./I<workdir>; exit $_EXIT_status;
|
||||
I<<<command>>>; _EXIT_status=$?; mkdir -p I<<<workdir>>>; rsync --protocol 30 --rsync-path=cd\ ./I<<<workdir>>>\;\ rsync -rlDzR -essh I<<<sln>>>:./I<<<file>>> ./I<<<workdir>>>; exit $_EXIT_status;
|
||||
|
||||
The B<--rsync-path=cd ...> is needed because old versions of B<rsync>
|
||||
do not support B<--no-implied-dirs>.
|
||||
|
@ -214,7 +296,7 @@ wrapping 'sh -c' is enough?
|
|||
|
||||
=item --cleanup
|
||||
|
||||
I<input> _EXIT_status=$?; <<return>>
|
||||
I<<<command>>> _EXIT_status=$?; <<return>>;
|
||||
|
||||
ssh I<sln> \(rm\ -f\ ./I<workdir>/{}\;\ rmdir\ ./I<workdir>\ \>\&/dev/null\;\); exit $_EXIT_status;
|
||||
|
||||
|
|
|
@ -90,6 +90,7 @@ echo '### Test tmux works on different shells'
|
|||
stdout ssh parallel@lo "$PARTMUX" 'false ::: 1 2 3 4; echo $?' | grep -v 'See output';
|
||||
stdout ssh tcsh@lo "$PARTMUX" 'true ::: 1 2 3 4; echo $status' | grep -v 'See output';
|
||||
stdout ssh tcsh@lo "$PARTMUX" 'false ::: 1 2 3 4; echo $status' | grep -v 'See output';
|
||||
echo "# command is currently too long for csh. Maybe it can be fixed?";
|
||||
stdout ssh csh@lo "$PARTMUX" 'true ::: 1 2 3 4; echo $status' | grep -v 'See output';
|
||||
stdout ssh csh@lo "$PARTMUX" 'false ::: 1 2 3 4; echo $status' | grep -v 'See output'
|
||||
|
||||
|
@ -131,7 +132,7 @@ echo "### Bash environment"
|
|||
#stdout ssh -t lo <<'EOS'
|
||||
myvar="myvar works"
|
||||
funky=$(perl -e 'print pack "c*", 1..255')
|
||||
myarray=('' array_val2 3 '' 5)
|
||||
myarray=('' array_val2 3 '' 5 ' space 6 ')
|
||||
declare -A assocarr
|
||||
assocarr[a]=assoc_val_a
|
||||
assocarr[b]=assoc_val_b
|
||||
|
@ -139,7 +140,7 @@ alias alias_echo="echo 3 arg";
|
|||
func_echo() {
|
||||
echo $*;
|
||||
echo "$myvar"
|
||||
echo ${myarray[1]}
|
||||
echo "${myarray[5]}"
|
||||
echo ${assocarr[a]}
|
||||
echo Funky-"$funky"-funky
|
||||
}
|
||||
|
@ -158,7 +159,7 @@ echo "### Zsh environment"
|
|||
stdout ssh -q zsh@lo <<'EOS' | egrep -v 'Welcome to |packages can be updated|security updates'
|
||||
myvar="myvar works"
|
||||
funky=$(perl -e 'print pack "c*", 1..255')
|
||||
myarray=('' array_val2 3 '' 5)
|
||||
myarray=('' array_val2 3 '' 5 ' space 6 ')
|
||||
declare -A assocarr
|
||||
assocarr[a]=assoc_val_a
|
||||
assocarr[b]=assoc_val_b
|
||||
|
@ -166,7 +167,7 @@ alias alias_echo="echo 3 arg";
|
|||
func_echo() {
|
||||
echo $*;
|
||||
echo "$myvar"
|
||||
echo $myarray[2]
|
||||
echo "$myarray[6]"
|
||||
echo ${assocarr[a]}
|
||||
echo Funky-"$funky"-funky
|
||||
}
|
||||
|
@ -186,7 +187,7 @@ echo "### Ksh environment"
|
|||
stdout ssh -q ksh@lo <<'EOS' | egrep -v 'Welcome to |packages can be updated|security updates'
|
||||
myvar="myvar works"
|
||||
funky=$(perl -e 'print pack "c*", 1..255')
|
||||
myarray=('' array_val2 3 '' 5)
|
||||
myarray=('' array_val2 3 '' 5 ' space 6 ')
|
||||
typeset -A assocarr
|
||||
assocarr[a]=assoc_val_a
|
||||
assocarr[b]=assoc_val_b
|
||||
|
@ -195,7 +196,7 @@ alias alias_echo="echo 3 arg";
|
|||
func_echo() {
|
||||
echo $*;
|
||||
echo "$myvar"
|
||||
echo ${myarray[1]}
|
||||
echo "${myarray[5]}"
|
||||
echo ${assocarr[a]}
|
||||
echo Funky-"$funky"-funky
|
||||
}
|
||||
|
@ -217,7 +218,8 @@ setenv myenvvar "myenvvar works"
|
|||
set funky (perl -e 'print pack "c*", 1..255')
|
||||
setenv funkyenv (perl -e 'print pack "c*", 1..255')
|
||||
|
||||
set myarray '' array_val2 3 '' 5
|
||||
set myarray '' array_val2 3 '' 5 ' space 6 '
|
||||
|
||||
# Assoc arrays do not exist
|
||||
#typeset -A assocarr
|
||||
#assocarr[a]=assoc_val_a
|
||||
|
@ -228,14 +230,14 @@ function func_echo
|
|||
echo $argv;
|
||||
echo "$myvar"
|
||||
echo "$myenvvar"
|
||||
echo $myarray[2]
|
||||
echo "$myarray[6]"
|
||||
# Assoc arrays do not exist in fish
|
||||
# echo ${assocarr[a]}
|
||||
echo
|
||||
echo
|
||||
echo
|
||||
echo Funky-"$funky"-funky
|
||||
echo Funky-"$funkyenv"-funky
|
||||
echo Funkyenv-"$funkyenv"-funkyenv
|
||||
echo
|
||||
echo
|
||||
echo
|
||||
|
@ -251,23 +253,15 @@ EOS
|
|||
|
||||
echo
|
||||
echo "### csh environment"
|
||||
# http://hyperpolyglot.org/unix-shells
|
||||
# makealias:
|
||||
# alias quote "/bin/sed -e 's/\\!/\\\\\!/g' -e 's/'\\\''/'\\\'\\\\\\\'\\\''/g' -e 's/^/'\''/' -e 's/"\$"/'\''/'"
|
||||
# alias makealias "quote | /bin/sed 's/^/alias \!:1 /' \!:2*"
|
||||
#
|
||||
# makealias_with_newline
|
||||
# perl -e '$/=undef;$_=<>;s/\n/\\\n/g;s/\047/\047\042\047\042\047/g;print'
|
||||
|
||||
stdout ssh -q csh@lo <<'EOS' | egrep -v 'Welcome to |packages can be updated|security updates'
|
||||
set myvar = "myvar works"
|
||||
set funky = "`perl -e 'print pack q(c*), 1..255'`"
|
||||
set myarray = ('' 'array_val2' '3' '' '5')
|
||||
set funky = "`perl -e 'print pack q(c*), 2..255'`"
|
||||
set myarray = ('' 'array_val2' '3' '' '5' ' space 6 ')
|
||||
#declare -A assocarr
|
||||
#assocarr[a]=assoc_val_a
|
||||
#assocarr[b]=assoc_val_b
|
||||
alias alias_echo echo 3 arg;
|
||||
alias alias_echo_var 'echo $argv; echo $myvar; echo ${myarray[2]}; echo Funky-"$funky"-funky'
|
||||
alias alias_echo_var 'echo $argv; echo "$myvar"; echo "${myarray[4]} special chars problem"; echo Funky-"$funky"-funky'
|
||||
|
||||
#function func_echo
|
||||
# echo $argv;
|
||||
|
@ -277,80 +271,11 @@ alias alias_echo_var 'echo $argv; echo $myvar; echo ${myarray[2]}; echo Funky-"$
|
|||
# echo Funky-"$funky"-funky
|
||||
#end
|
||||
|
||||
# ALIAS TO EXPORT ALIASES:
|
||||
|
||||
# Quote ' by putting it inside "
|
||||
# s/'/'"'"'/g;
|
||||
# ' => \047 " => \042
|
||||
# s/\047/\047\042\047\042\047/g;
|
||||
# Quoted: s/\\047/\\047\\042\\047\\042\\047/g\;
|
||||
|
||||
# Remove () from second column
|
||||
# s/^(\S+)(\s+)\((.*)\)/\1\2\3/
|
||||
# \047 => '
|
||||
# s/^(\S+)(\s+)\((.*)\)/\1\2\3/;
|
||||
# Quoted: s/\^\(\\S+\)\(\\s+\)\\\(\(.\*\)\\\)/\\1\\2\\3/\;
|
||||
|
||||
# Add ' around second column
|
||||
# s/^(\S+)(\s+)(.*)/\1\2'\3'/
|
||||
# \047 => '
|
||||
# s/^(\S+)(\s+)(.*)/\1\2\047\3\047/;
|
||||
# Quoted: s/\^\(\\S+\)\(\\s+\)\(.\*\)/\\1\\2\\047\\3\\047/\;
|
||||
|
||||
# Quote ! as \!
|
||||
# s/\!/\\\!/g;
|
||||
# Quoted: s/\\\!/\\\\\\\!/g;
|
||||
|
||||
# Prepend with "\nalias "
|
||||
# s/^/\001alias /;
|
||||
# Quoted: s/\^/\\001alias\ /\;
|
||||
|
||||
#!# alias env_parallel 'setenv PARALLEL_ENV "`alias | perl -pe s/\\047/\\047\\042\\047\\042\\047/g\;s/\^\(\\S+\)\(\\s+\)\\\(\(.\*\)\\\)/\\1\\2\\3/\;s/\^\(\\S+\)\(\\s+\)\(.\*\)/\\1\\2\\047\\3\\047/\;s/\^/\\001alias\ /\;s/\\\!/\\\\\\\!/g;`";parallel \!*; setenv PARALLEL_ENV'
|
||||
|
||||
|
||||
## set tmpfile=`tempfile`
|
||||
## foreach v (`set | awk -e '{print $1}' |grep -v prompt2`);
|
||||
## eval if'($?'$v' && ${#'$v'} <= 1) echo scalar'$v'="$'$v'"' >> $tmpfile;
|
||||
## eval if'($?'$v' && ${#'$v'} > 1) echo array'$v'="$'$v'"' >> $tmpfile;
|
||||
## end
|
||||
## cat $tmpfile | parallel --shellquote | perl -pe 's/^scalar(\S+).=/set $1=/ or s/^array(\S+).=(.*)/set $1=($2)/ && s/\\ / /g;'; rm $tmpfile
|
||||
##
|
||||
## set tmpfile=`tempfile`
|
||||
## foreach _vARnAmE (`set | awk -e '{print $1}' |grep -v prompt2`);
|
||||
## eval if'($?'$_vARnAmE' && ${#'$_vARnAmE'} <= 1) echo scalar'$_vARnAmE'="$'$_vARnAmE'"' >> $tmpfile; eval if'($?'$_vARnAmE' && ${#'$_vARnAmE'} > 1) echo array'$_vARnAmE'="$'$_vARnAmE'"' >> $tmpfile;
|
||||
## end
|
||||
## cat $tmpfile | parallel --shellquote | perl -pe 's/^scalar(\S+).=/set $1=/ or s/^array(\S+).=(.*)/set $1=($2)/ && s/\\ / /g;'; rm $tmpfile; unset tmpfile
|
||||
##
|
||||
## #!/bin/csh
|
||||
##
|
||||
## set _tmpfile=`tempfile`;
|
||||
## foreach _vARnAmE (`set | awk -e '{print $1}' |grep -Ev 'prompt2|_tmpfile'`);
|
||||
## eval if'($?'$_vARnAmE' && ${#'$_vARnAmE'} <= 1) echo scalar'$_vARnAmE'="$'$_vARnAmE'"' >> $_tmpfile;
|
||||
## eval if'($?'$_vARnAmE' && ${#'$_vARnAmE'} > 1) echo array'$_vARnAmE'="$'$_vARnAmE'"' >> $_tmpfile;
|
||||
## end
|
||||
## setenv PARALLEL_ENV `cat $_tmpfile | parallel --shellquote | perl -pe 's/^scalar(\S+).=/set $1=/ or s/^array(\S+).=(.*)/set $1=($2)/ && s/\\ / /g; s/$/\001/';`
|
||||
## rm $_tmpfile;
|
||||
## unset _tmpfile
|
||||
##
|
||||
## setenv PARALLEL_ENV "$PARALLEL_ENV`alias | perl -pe s/\\047/\\047\\042\\047\\042\\047/g\;s/\^\(\\S+\)\(\\s+\)\\\(\(.\*\)\\\)/\\1\\2\\3/\;s/\^\(\\S+\)\(\\s+\)\(.\*\)/\\1\\2\\047\\3\\047/\;s/\^/\\001alias\ /\;s/\\\!/\\\\\\\!/g;`"
|
||||
## parallel \!*
|
||||
## setenv PARALLEL_ENV
|
||||
##
|
||||
##
|
||||
## perl -e '$/=undef;$_=<>;s/\n/\\\\\n/g;s/\047/\047\042\047\042\047/g;print "eval \047$_\047"'
|
||||
##
|
||||
## foreach g (h i j)
|
||||
## echo $g
|
||||
## end
|
||||
##
|
||||
##
|
||||
|
||||
|
||||
env_parallel alias_echo ::: alias_works
|
||||
env_parallel alias_echo_var ::: alias_var_does_not_work
|
||||
env_parallel alias_echo_var ::: alias_var_works
|
||||
env_parallel func_echo ::: function_does_not_work
|
||||
env_parallel -S csh@lo alias_echo ::: alias_works_over_ssh
|
||||
env_parallel -S csh@lo alias_echo_var ::: alias_var_does_not_work
|
||||
env_parallel -S csh@lo alias_echo_var ::: alias_var_works_over_ssh
|
||||
env_parallel -S csh@lo func_echo ::: function_does_not_work_over_ssh
|
||||
echo
|
||||
echo "$funky" | parallel --shellquote
|
||||
|
|
|
@ -66,7 +66,7 @@ perl -ne '$/="\n\n"; /^Output/../^[^O]\S/ and next; /^ / and print;' ../../src/
|
|||
# Due to order is often mixed up
|
||||
s/echo \d; exit \d\n/echo X; exit X\n/;
|
||||
# Race condition causes outdir to sometime exist
|
||||
s/(std(out|err):) Permission denied/$1 No such file or directory/;
|
||||
s/(std(out|err)|seq): Permission denied/$1: No such file or directory/;
|
||||
'
|
||||
# 3+3 .par files (from --files), 1 .tms-file from tmux attach
|
||||
find {$TMPDIR,/var/tmp,/tmp}/{fif,tms,par[^a]}* -mmin -10 2>/dev/null | wc -l
|
||||
|
|
|
@ -175,7 +175,7 @@ pod2pdf --output-file ./parallel_design.pdf ./parallel_design.pod --title "GNU P
|
|||
Warning: pod2pdf not found. Using old parallel_design.pdf
|
||||
make[0]: Entering directory `/tmp/parallel-00000000/src'
|
||||
/bin/mkdir -p '/usr/local/bin'
|
||||
/usr/bin/install -c parallel sql niceload env_parallel env_parallel.bash env_parallel.zsh env_parallel.fish env_parallel.ksh env_parallel.pdksh env_parallel.csh '/usr/local/bin'
|
||||
/usr/bin/install -c parallel sql niceload env_parallel env_parallel.bash env_parallel.zsh env_parallel.fish env_parallel.ksh env_parallel.pdksh env_parallel.csh env_parallel.tcsh '/usr/local/bin'
|
||||
make install-exec-hook
|
||||
make[0]: Entering directory `/tmp/parallel-00000000/src'
|
||||
rm /usr/local/bin/sem || true
|
||||
|
|
|
@ -81,14 +81,23 @@ echo '### Test tmux works on different shells'
|
|||
0
|
||||
(stdout parallel -Scsh@lo,tcsh@lo,parallel@lo,zsh@lo --tmux false ::: 1 2 3 4; echo $?) | grep -v 'See output';
|
||||
4
|
||||
export PARTMUX='parallel -Scsh@lo,tcsh@lo,parallel@lo,zsh@lo --tmux '; stdout ssh zsh@lo "$PARTMUX" 'true ::: 1 2 3 4; echo $status' | grep -v 'See output'; stdout ssh zsh@lo "$PARTMUX" 'false ::: 1 2 3 4; echo $status' | grep -v 'See output'; stdout ssh parallel@lo "$PARTMUX" 'true ::: 1 2 3 4; echo $?' | grep -v 'See output'; stdout ssh parallel@lo "$PARTMUX" 'false ::: 1 2 3 4; echo $?' | grep -v 'See output'; stdout ssh tcsh@lo "$PARTMUX" 'true ::: 1 2 3 4; echo $status' | grep -v 'See output'; stdout ssh tcsh@lo "$PARTMUX" 'false ::: 1 2 3 4; echo $status' | grep -v 'See output'; stdout ssh csh@lo "$PARTMUX" 'true ::: 1 2 3 4; echo $status' | grep -v 'See output'; stdout ssh csh@lo "$PARTMUX" 'false ::: 1 2 3 4; echo $status' | grep -v 'See output'
|
||||
export PARTMUX='parallel -Scsh@lo,tcsh@lo,parallel@lo,zsh@lo --tmux '; stdout ssh zsh@lo "$PARTMUX" 'true ::: 1 2 3 4; echo $status' | grep -v 'See output'; stdout ssh zsh@lo "$PARTMUX" 'false ::: 1 2 3 4; echo $status' | grep -v 'See output'; stdout ssh parallel@lo "$PARTMUX" 'true ::: 1 2 3 4; echo $?' | grep -v 'See output'; stdout ssh parallel@lo "$PARTMUX" 'false ::: 1 2 3 4; echo $?' | grep -v 'See output'; stdout ssh tcsh@lo "$PARTMUX" 'true ::: 1 2 3 4; echo $status' | grep -v 'See output'; stdout ssh tcsh@lo "$PARTMUX" 'false ::: 1 2 3 4; echo $status' | grep -v 'See output'; echo "# command is currently too long for csh. Maybe it can be fixed?"; stdout ssh csh@lo "$PARTMUX" 'true ::: 1 2 3 4; echo $status' | grep -v 'See output'; stdout ssh csh@lo "$PARTMUX" 'false ::: 1 2 3 4; echo $status' | grep -v 'See output'
|
||||
0
|
||||
4
|
||||
0
|
||||
4
|
||||
0
|
||||
4
|
||||
0
|
||||
# command is currently too long for csh. Maybe it can be fixed?
|
||||
Word too long.
|
||||
Word too long.
|
||||
Word too long.
|
||||
Word too long.
|
||||
4
|
||||
Word too long.
|
||||
Word too long.
|
||||
Word too long.
|
||||
Word too long.
|
||||
4
|
||||
echo '### works'
|
||||
### works
|
||||
|
@ -133,7 +142,7 @@ Test env_parallel:
|
|||
3 arg alias_works
|
||||
function_works
|
||||
myvar works
|
||||
array_val2
|
||||
space 6
|
||||
assoc_val_a
|
||||
Funky-
|
||||
|
||||
|
@ -143,7 +152,7 @@ Funky-
|
|||
3 arg alias_works_over_ssh
|
||||
function_works_over_ssh
|
||||
myvar works
|
||||
array_val2
|
||||
space 6
|
||||
assoc_val_a
|
||||
Funky-
|
||||
|
||||
|
@ -162,7 +171,7 @@ Funky-
|
|||
zsh:130: command not found: alias_echo
|
||||
function_works
|
||||
myvar works
|
||||
array_val2
|
||||
space 6
|
||||
assoc_val_a
|
||||
Funky-
|
||||
|
||||
|
@ -170,7 +179,7 @@ Funky-
|
|||
zsh:130: command not found: alias_echo
|
||||
function_works_over_ssh
|
||||
myvar works
|
||||
array_val2
|
||||
space 6
|
||||
assoc_val_a
|
||||
Funky-
|
||||
|
||||
|
@ -187,14 +196,14 @@ Funky-
|
|||
3 arg alias_works
|
||||
function_works
|
||||
myvar works
|
||||
array_val2
|
||||
space 6
|
||||
assoc_val_a
|
||||
Funky-
|
||||
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€亗儎厗噲墛媽崕彁憭摂晼棙櫄洔潪煚、¥ウЖ┆<D096><E29486><EFBFBD>辈炒刀犯购患骄坷谅媚牌侨墒颂臀闲岩釉罩棕仝圮蒉哙徕沅彐玷殛腱眍镳耱篝貊鼬<E8B28A><E9BCAC><EFBFBD><EFBFBD>-funky
|
||||
3 arg alias_works_over_ssh
|
||||
function_works_over_ssh
|
||||
myvar works
|
||||
array_val2
|
||||
space 6
|
||||
assoc_val_a
|
||||
Funky-
|
||||
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€亗儎厗噲墛媽崕彁憭摂晼棙櫄洔潪煚、¥ウЖ┆<D096><E29486><EFBFBD>辈炒刀犯购患骄坷谅媚牌侨墒颂臀闲岩釉罩棕仝圮蒉哙徕沅彐玷殛腱眍镳耱篝貊鼬<E8B28A><E9BCAC><EFBFBD><EFBFBD>-funky
|
||||
|
@ -215,12 +224,12 @@ env_parallel: Warning: ASCII value 1 in variables is not supported
|
|||
function_works
|
||||
myvar works
|
||||
myenvvar works
|
||||
3
|
||||
space 6
|
||||
|
||||
|
||||
|
||||
Funky-
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€亗儎厗噲墛媽崕彁憭摂晼棙櫄洔潪煚、¥ウЖ┆<D096><E29486><EFBFBD>辈炒刀犯购患骄坷谅媚牌侨墒颂臀闲岩釉罩棕仝圮蒉哙徕沅彐玷殛腱眍镳耱篝貊鼬<E8B28A><E9BCAC><EFBFBD><EFBFBD>-funky
|
||||
Funky-
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€亗儎厗噲墛媽崕彁憭摂晼棙櫄洔潪煚、¥ウЖ┆<D096><E29486><EFBFBD>辈炒刀犯购患骄坷谅媚牌侨墒颂臀闲岩釉罩棕仝圮蒉哙徕沅彐玷殛腱眍镳耱篝貊鼬<E8B28A><E9BCAC><EFBFBD><EFBFBD>-funky
|
||||
Funkyenv-
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€亗儎厗噲墛媽崕彁憭摂晼棙櫄洔潪煚、¥ウЖ┆<D096><E29486><EFBFBD>辈炒刀犯购患骄坷谅媚牌侨墒颂臀闲岩釉罩棕仝圮蒉哙徕沅彐玷殛腱眍镳耱篝貊鼬<E8B28A><E9BCAC><EFBFBD><EFBFBD>-funkyenv
|
||||
|
||||
|
||||
|
||||
|
@ -232,12 +241,12 @@ env_parallel: Warning: ASCII value 1 in variables is not supported
|
|||
function_works_over_ssh
|
||||
myvar works
|
||||
myenvvar works
|
||||
3
|
||||
space 6
|
||||
|
||||
|
||||
|
||||
Funky-
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€亗儎厗噲墛媽崕彁憭摂晼棙櫄洔潪煚、¥ウЖ┆<D096><E29486><EFBFBD>辈炒刀犯购患骄坷谅媚牌侨墒颂臀闲岩釉罩棕仝圮蒉哙徕沅彐玷殛腱眍镳耱篝貊鼬<E8B28A><E9BCAC><EFBFBD><EFBFBD>-funky
|
||||
Funky-
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€亗儎厗噲墛媽崕彁憭摂晼棙櫄洔潪煚、¥ウЖ┆<D096><E29486><EFBFBD>辈炒刀犯购患骄坷谅媚牌侨墒颂臀闲岩釉罩棕仝圮蒉哙徕沅彐玷殛腱眍镳耱篝貊鼬<E8B28A><E9BCAC><EFBFBD><EFBFBD>-funky
|
||||
Funkyenv-
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€亗儎厗噲墛媽崕彁憭摂晼棙櫄洔潪煚、¥ウЖ┆<D096><E29486><EFBFBD>辈炒刀犯购患骄坷谅媚牌侨墒颂臀闲岩釉罩棕仝圮蒉哙徕沅彐玷殛腱眍镳耱篝貊鼬<E8B28A><E9BCAC><EFBFBD><EFBFBD>-funkyenv
|
||||
|
||||
|
||||
|
||||
|
@ -253,9 +262,13 @@ Warning: no access to tty (Bad file descriptor).
|
|||
Thus no job control in this shell.
|
||||
3 arg alias_works
|
||||
|
||||
myvar: Undefined variable.
|
||||
myvar works
|
||||
space special chars problem
|
||||
Funky-
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€亗儎厗噲墛媽崕彁憭摂晼棙櫄洔潪煚、¥ウЖ┆<D096><E29486><EFBFBD>辈炒刀犯购患骄坷谅媚牌侨墒颂臀闲岩釉罩棕仝圮蒉哙徕沅彐玷殛腱眍镳耱篝貊鼬<E8B28A><E9BCAC><EFBFBD><EFBFBD>-funky alias_var_works
|
||||
func_echo: Command not found.
|
||||
3 arg alias_works_over_ssh
|
||||
myvar: Undefined variable.
|
||||
myvar works
|
||||
space special chars problem
|
||||
Funky-
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€亗儎厗噲墛媽崕彁憭摂晼棙櫄洔潪煚、¥ウЖ┆<D096><E29486><EFBFBD>辈炒刀犯购患骄坷谅媚牌侨墒颂臀闲岩釉罩棕仝圮蒉哙徕沅彐玷殛腱眍镳耱篝貊鼬<E8B28A><E9BCAC><EFBFBD><EFBFBD>-funky alias_var_works_over_ssh
|
||||
func_echo: Command not found.
|
||||
\\\\\\\\ \ \\\
\\\\\\\\\\\\\\ \!\"\#\$%\&\'\(\)\*+,-./0123456789:\;\<\=\>\?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\[\\\]\^_\`abcdefghijklmnopqrstuvwxyz\{\|\}\~€乗俓僜刓匼哱嘰圽塡奬媆孿峔嶾廫怽慭抃揬擻昞朶梊榎橽歕沑淺漒瀄焅燶<E78485><E787B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>╘‐猏玕琝璡甛痋癨盶瞈砛碶礬禱穃竆筡篭籠糪絓綷縗繺羂耚肻腬臷芢荺萛蒤蔦薥蘚蚛蝄蟎衆裓襖覾診誠謀譢豛賊赲踈躙輁轡運郳醆鈂鉢鋅錦鎈鏫鑌閈闬隲靄韁頫颸餦馶騖骪鬨鮘鯸鱘鳿鵟鶿鸤黒齖㘎<E9BD96>
|
||||
\\\\\\\\ \ \\\
\\\\\\\\\\\\\\ \!\"\#\$%\&\'\(\)\*+,-./0123456789:\;\<\=\>\?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\[\\\]\^_\`abcdefghijklmnopqrstuvwxyz\{\|\}\~€乗俓僜刓匼哱嘰圽塡奬媆孿峔嶾廫怽慭抃揬擻昞朶梊榎橽歕沑淺漒瀄焅燶<E78485><E787B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>╘‐猏玕琝璡甛痋癨盶瞈砛碶礬禱穃竆筡篭籠糪絓綷縗繺羂耚肻腬臷芢荺萛蒤蔦薥蘚蚛蝄蟎衆裓襖覾診誠謀譢豛賊赲踈躙輁轡運郳醆鈂鉢鋅錦鎈鏫鑌閈闬隲靄韁頫颸餦馶騖骪鬨鮘鯸鱘鳿鵟鶿鸤黒齖㘎<E9BD96>
|
||||
|
|
|
@ -407,13 +407,13 @@ C
|
|||
outdir/1/C/seq
|
||||
outdir/1/C/stderr
|
||||
outdir/1/C/stdout
|
||||
/bin/bash: outdir/1/A/seq: Permission denied
|
||||
/bin/bash: outdir/1/A/seq: No such file or directory
|
||||
/bin/bash: line 1: outdir/1/A/stderr: No such file or directory
|
||||
/bin/bash: line 2: outdir/1/A/stdout: No such file or directory
|
||||
/bin/bash: line 3: outdir/1/B/seq: Permission denied
|
||||
/bin/bash: line 3: outdir/1/B/seq: No such file or directory
|
||||
/bin/bash: line 4: outdir/1/B/stderr: No such file or directory
|
||||
/bin/bash: line 5: outdir/1/B/stdout: No such file or directory
|
||||
/bin/bash: line 6: outdir/1/C/seq: Permission denied
|
||||
/bin/bash: line 6: outdir/1/C/seq: No such file or directory
|
||||
/bin/bash: line 7: outdir/1/C/stderr: No such file or directory
|
||||
/bin/bash: line 8: outdir/1/C/stdout: No such file or directory
|
||||
parallel --header : --results outdir echo ::: f1 A B ::: f2 C D
|
||||
|
@ -734,7 +734,11 @@ pdksh: Put this in /home/tange/.profile: source /usr/local/bin/env_parallel.pdk
|
|||
|
||||
csh: Put this in /home/tange/.cshrc: source /usr/local/bin/env_parallel.csh
|
||||
E.g. by doing: echo 'source /usr/local/bin/env_parallel.csh' >> /home/tange/.cshrc
|
||||
Supports: aliases
|
||||
Supports: aliases, variables, arrays with no special chars
|
||||
|
||||
tcsh: Put this in /home/tange/.tcshrc: source /usr/local/bin/env_parallel.tcsh
|
||||
E.g. by doing: echo 'source /usr/local/bin/env_parallel.tcsh' >> /home/tange/.tcshrc
|
||||
Supports: aliases, variables, arrays with no special chars
|
||||
|
||||
For details: see man env_parallel
|
||||
|
||||
|
|
Loading…
Reference in a new issue