\input texinfo
@setfilename env_parallel.info

@documentencoding utf-8

@settitle env_parallel - export environment to GNU parallel

@node Top
@top env_parallel

@menu
* NAME::
* SYNOPSIS::
* DESCRIPTION::
* OPTIONS::
* SUPPORTED SHELLS::
* EXIT STATUS::
* AUTHOR::
* LICENSE::
* DEPENDENCIES::
* SEE ALSO::
@end menu

@node NAME
@chapter NAME

env_parallel - export environment to GNU parallel

@node SYNOPSIS
@chapter SYNOPSIS

@strong{env_parallel} [--record-env|--session|--end-session]
  [options for GNU Parallel]

@node DESCRIPTION
@chapter DESCRIPTION

@strong{env_parallel} is a shell function that exports the current
environment to GNU @strong{parallel}.

If the shell function is not loaded, a dummy script will be run
instead that explains how to install the function.

@strong{env_parallel} is 100 ms slower at startup than pure GNU
@strong{parallel}, and takes up to 30% longer to start a job (typically 15 ms).

Due to the problem with environment space (see below) the recommended
usage is either:

@verbatim
  # Do --record-env into $PARALLEL_IGNORED_NAMES
  env_parallel --session

  # Define whatever you want to use
  myfunc() { myalias and functions $myvar work. $1.; }
  alias myalias='echo Aliases'
  myvar='and variables'

  # env_parallel will not export names in $PARALLEL_IGNORED_NAMES
  env_parallel -S localhost myfunc ::: Hooray
@end verbatim

Or:

@verbatim
  # Record the "clean" environment (this only needs to be run once)
  env_parallel --record-env

  # Optionally edit ~/.parallel/ignored_vars (only needed once)

  # Define whatever you want to use
  myfunc() { myalias and functions $myvar work. $1.; }
  alias myalias='echo Aliases'
  myvar='and variables'

  # Use --env _ to only transfer the names not in the "empty" environment
  env_parallel --env _ -S localhost myfunc ::: Hooray
@end verbatim

In @strong{csh} @strong{--session} is not supported:

@verbatim
  # Record the "clean" environment - this only needs to be run once
  env_parallel --record-env

  # Optionally edit ~/.parallel/ignored_vars - only needed once

  # Define whatever you want to use
  alias myalias 'echo Aliases $myvar \!*.'
  set myvar='and variables'

  # Use --env _ to only transfer the names not in the "empty" environment
  env_parallel --env _ -S localhost myalias ::: work
@end verbatim

@menu
* Environment space::
@end menu

@node Environment space
@section Environment space

By default @strong{env_parallel} will export all environment variables,
arrays, aliases, functions and shell options (see details for the
individual shells below).

But this only works if the size of the current environment is smaller
than the maximal length of a command and smaller than half of the max
if running remotely. E.g. The max size of Bash's command is 128 KB, so
@strong{env_parallel} will fail if '@strong{set | wc -c}' is bigger than 128
KB. Technically the limit is in execve(1) which IPC::open3 uses.

Bash completion functions are well-known for taking up well over 128
KB of environment space and the primary reason for causing
@strong{env_parallel} to fail.

Instead you can use @strong{--env} to specify which variables, arrays,
aliases and functions to export as this will only export those with
the given name. Or follow the recommended usage in shown in
DESCRIPTION.

@node OPTIONS
@chapter OPTIONS

Same as GNU @strong{parallel} in addition to these:

@table @asis
@item @strong{--end-session}
@anchor{@strong{--end-session}}

Undo last @strong{--session}

@item @strong{--record-env}
@anchor{@strong{--record-env}}

Record all names currently defined to be ignored every time running
@strong{env_parallel} in the future.

@item @strong{--session}
@anchor{@strong{--session}}

Ignore all names currently defined. Aliases, variables, arrays, and
functions currently defined will not be transferred.

But names defined @emph{after} running @strong{parallel --session} @emph{will} be
transferred.

This is only valid in the running shell, and can be undone with
@strong{parallel --end-session}.

You can run multiple @strong{--session} inside each other:

@verbatim
  env_parallel --session
  var=not
  # var is transferred
  env_parallel -Slocalhost 'echo var is $var' ::: ignored
  env_parallel --session
  # var is not transferred
  env_parallel -Slocalhost 'echo var is $var' ::: ignored
  env_parallel --end-session
  # var is transferred again
  env_parallel -Slocalhost 'echo var is $var' ::: ignored
@end verbatim

@end table

@node SUPPORTED SHELLS
@chapter SUPPORTED SHELLS

@menu
* Ash::
* Bash::
* csh::
* Dash::
* fish::
* ksh::
* mksh::
* pdksh::
* sh::
* tcsh::
* Zsh::
@end menu

@node Ash
@section Ash

@menu
* Installation::
* Supported use::
@end menu

@node Installation
@subsection Installation

Put this in $HOME/.profile:

@verbatim
  . env_parallel.ash
@end verbatim

E.g. by doing:

@verbatim
  echo '. env_parallel.ash' >> $HOME/.profile
@end verbatim

@node Supported use
@subsection Supported use

@strong{--env} is supported to export only the variable, or alias with the
given name. Multiple @strong{--env}s can be given.

@strong{--session} is supported.

@table @asis
@item aliases
@anchor{aliases}

@verbatim
  alias myecho='echo aliases'
  env_parallel myecho ::: work
  env_parallel -S server myecho ::: work
  env_parallel --env myecho myecho ::: work
  env_parallel --env myecho -S server myecho ::: work

  alias multiline='echo multiline
    echo aliases'
  env_parallel multiline ::: work
  env_parallel -S server multiline ::: work
  env_parallel --env multiline multiline ::: work
  env_parallel --env multiline -S server multiline ::: work
@end verbatim

@item functions
@anchor{functions}

@verbatim
  ash cannot list defined functions - thus is not supported.
@end verbatim

@item variables
@anchor{variables}

@verbatim
  myvar=variables
  env_parallel echo '$myvar' ::: work
  env_parallel -S server echo '$myvar' ::: work
  env_parallel --env myvar echo '$myvar' ::: work
  env_parallel --env myvar -S server echo '$myvar' ::: work
@end verbatim

@item arrays
@anchor{arrays}

Arrays are not supported by Ash.

@end table

@node Bash
@section Bash

@menu
* Installation 1::
* Supported use 1::
* BUGS::
@end menu

@node Installation 1
@subsection Installation

Put this in $HOME/.bashrc:

@verbatim
  . env_parallel.bash
@end verbatim

E.g. by doing:

@verbatim
  echo '. env_parallel.bash' >> $HOME/.bashrc
@end verbatim

@node Supported use 1
@subsection Supported use

@strong{--env} is supported to export only the variable, alias, function, or
array with the given name. Multiple @strong{--env}s can be given.

@strong{--session} is supported.

@table @asis
@item aliases
@anchor{aliases 1}

@verbatim
  alias myecho='echo aliases'
  env_parallel myecho ::: work
  env_parallel -S server myecho ::: work
  env_parallel --env myecho myecho ::: work
  env_parallel --env myecho -S server myecho ::: work

  alias multiline='echo multiline
    echo aliases'
  env_parallel 'multiline {};
    echo but only when followed by a newline' ::: work
  env_parallel -S server 'multiline {};
    echo but only when followed by a newline' ::: work
  env_parallel --env multiline 'multiline {};
    echo but only when followed by a newline' ::: work
  env_parallel --env multiline -S server 'multiline {};
    echo but only when followed by a newline' ::: work
@end verbatim

@item functions
@anchor{functions 1}

@verbatim
  myfunc() { echo functions $*; }
  env_parallel myfunc ::: work
  env_parallel -S server myfunc ::: work
  env_parallel --env myfunc myfunc ::: work
  env_parallel --env myfunc -S server myfunc ::: work
@end verbatim

@item variables
@anchor{variables 1}

@verbatim
  myvar=variables
  env_parallel echo '$myvar' ::: work
  env_parallel -S server echo '$myvar' ::: work
  env_parallel --env myvar echo '$myvar' ::: work
  env_parallel --env myvar -S server echo '$myvar' ::: work
@end verbatim

@item arrays
@anchor{arrays 1}

@verbatim
  myarray=(arrays work, too)
  env_parallel -k echo '${myarray[{}]}' ::: 0 1 2
  env_parallel -k -S server echo '${myarray[{}]}' ::: 0 1 2
  env_parallel -k --env myarray echo '${myarray[{}]}' ::: 0 1 2
  env_parallel -k --env myarray -S server \
    echo '${myarray[{}]}' ::: 0 1 2
@end verbatim

@end table

@node BUGS
@subsection BUGS

Due to a bug in Bash, aliases containing newlines must be followed by
a newline in the command. Some systems are not affected by this bug,
but will print a warning anyway.

@node csh
@section csh

@strong{env_parallel} for @strong{csh} breaks @strong{$PARALLEL}, so do not use
@strong{$PARALLEL}.

@menu
* Installation 2::
* Supported use 2::
@end menu

@node Installation 2
@subsection Installation

Put this in $HOME/.cshrc:

@verbatim
  source `which env_parallel.csh`
@end verbatim

E.g. by doing:

@verbatim
  echo 'source `which env_parallel.csh`' >> $HOME/.cshrc
@end verbatim

@node Supported use 2
@subsection Supported use

@strong{--env} is supported to export only the variable, alias, or
array with the given name. Multiple @strong{--env}s can be given.

@table @asis
@item aliases
@anchor{aliases 2}

@verbatim
  alias myecho 'echo aliases'
  env_parallel myecho ::: work
  env_parallel -S server myecho ::: work
  env_parallel --env myecho myecho ::: work
  env_parallel --env myecho -S server myecho ::: work
@end verbatim

@item functions
@anchor{functions 2}

Not supported by @strong{csh}.

@item variables
@anchor{variables 2}

@verbatim
  set myvar=variables
  env_parallel echo '$myvar' ::: work
  env_parallel -S server echo '$myvar' ::: work
  env_parallel --env myvar echo '$myvar' ::: work
  env_parallel --env myvar -S server echo '$myvar' ::: work
@end verbatim

@item arrays with no special chars
@anchor{arrays with no special chars}

@verbatim
  set myarray=(arrays work, too)
  env_parallel -k echo \$'{myarray[{}]}' ::: 1 2 3
  env_parallel -k -S server echo \$'{myarray[{}]}' ::: 1 2 3
  env_parallel -k --env myarray echo \$'{myarray[{}]}' ::: 1 2 3
  env_parallel -k --env myarray -S server \
    echo \$'{myarray[{}]}' ::: 1 2 3
@end verbatim

@end table

@node Dash
@section Dash

@menu
* Installation 3::
* Supported use 3::
@end menu

@node Installation 3
@subsection Installation

Put this in $HOME/.profile:

@verbatim
  . env_parallel.dash
@end verbatim

E.g. by doing:

@verbatim
  echo '. env_parallel.dash' >> $HOME/.profile
@end verbatim

@node Supported use 3
@subsection Supported use

@strong{--env} is supported to export only the variable, or alias with the
given name. Multiple @strong{--env}s can be given.

@strong{--session} is supported.

@table @asis
@item aliases
@anchor{aliases 3}

@verbatim
  alias myecho='echo aliases'
  env_parallel myecho ::: work
  env_parallel -S server myecho ::: work
  env_parallel --env myecho myecho ::: work
  env_parallel --env myecho -S server myecho ::: work

  alias multiline='echo multiline
    echo aliases'
  env_parallel multiline ::: work
  env_parallel -S server multiline ::: work
  env_parallel --env multiline multiline ::: work
  env_parallel --env multiline -S server multiline ::: work
@end verbatim

@item functions
@anchor{functions 3}

@verbatim
  dash cannot list defined functions - thus is not supported.
@end verbatim

@item variables
@anchor{variables 3}

@verbatim
  myvar=variables
  env_parallel echo '$myvar' ::: work
  env_parallel -S server echo '$myvar' ::: work
  env_parallel --env myvar echo '$myvar' ::: work
  env_parallel --env myvar -S server echo '$myvar' ::: work
@end verbatim

@item arrays
@anchor{arrays 2}

@verbatim
  dash does not support arrays.
@end verbatim

@end table

@node fish
@section fish

@menu
* Installation 4::
* Supported use 4::
@end menu

@node Installation 4
@subsection Installation

Put this in $HOME/.config/fish/config.fish:

@verbatim
  source (which env_parallel.fish)
@end verbatim

E.g. by doing:

@verbatim
  echo 'source (which env_parallel.fish)' \
    >> $HOME/.config/fish/config.fish
@end verbatim

@node Supported use 4
@subsection Supported use

@strong{--env} is supported to export only the variable, alias, function, or
array with the given name. Multiple @strong{--env}s can be given.

@strong{--session} is supported.

@table @asis
@item aliases
@anchor{aliases 4}

@verbatim
  alias myecho 'echo aliases'
  env_parallel myecho ::: work
  env_parallel -S server myecho ::: work
  env_parallel --env myecho myecho ::: work
  env_parallel --env myecho -S server myecho ::: work
@end verbatim

@item functions
@anchor{functions 4}

@verbatim
  function myfunc
    echo functions $argv
  end
  env_parallel myfunc ::: work
  env_parallel -S server myfunc ::: work
  env_parallel --env myfunc myfunc ::: work
  env_parallel --env myfunc -S server myfunc ::: work
@end verbatim

@item variables
@anchor{variables 4}

@verbatim
  set myvar variables
  env_parallel echo '$myvar' ::: work
  env_parallel -S server echo '$myvar' ::: work
  env_parallel --env myvar echo '$myvar' ::: work
  env_parallel --env myvar -S server echo '$myvar' ::: work
@end verbatim

@item arrays
@anchor{arrays 3}

@verbatim
  set myarray arrays work, too
  env_parallel -k echo '$myarray[{}]' ::: 1 2 3
  env_parallel -k -S server echo '$myarray[{}]' ::: 1 2 3
  env_parallel -k --env myarray echo '$myarray[{}]' ::: 1 2 3
  env_parallel -k --env myarray -S server \
    echo '$myarray[{}]' ::: 1 2 3
@end verbatim

@end table

@node ksh
@section ksh

@menu
* Installation 5::
* Supported use 5::
@end menu

@node Installation 5
@subsection Installation

Put this in $HOME/.kshrc:

@verbatim
  source env_parallel.ksh
@end verbatim

E.g. by doing:

@verbatim
  echo 'source env_parallel.ksh' >> $HOME/.kshrc
@end verbatim

@node Supported use 5
@subsection Supported use

@strong{--env} is supported to export only the variable, alias, function, or
array with the given name. Multiple @strong{--env}s can be given.

@strong{--session} is supported.

@table @asis
@item aliases
@anchor{aliases 5}

@verbatim
  alias myecho='echo aliases'
  env_parallel myecho ::: work
  env_parallel -S server myecho ::: work
  env_parallel --env myecho myecho ::: work
  env_parallel --env myecho -S server myecho ::: work

  alias multiline='echo multiline
    echo aliases'
  env_parallel multiline ::: work
  env_parallel -S server multiline ::: work
  env_parallel --env multiline multiline ::: work
  env_parallel --env multiline -S server multiline ::: work
@end verbatim

@item functions
@anchor{functions 5}

@verbatim
  myfunc() { echo functions $*; }
  env_parallel myfunc ::: work
  env_parallel -S server myfunc ::: work
  env_parallel --env myfunc myfunc ::: work
  env_parallel --env myfunc -S server myfunc ::: work
@end verbatim

@item variables
@anchor{variables 5}

@verbatim
  myvar=variables
  env_parallel echo '$myvar' ::: work
  env_parallel -S server echo '$myvar' ::: work
  env_parallel --env myvar echo '$myvar' ::: work
  env_parallel --env myvar -S server echo '$myvar' ::: work
@end verbatim

@item arrays
@anchor{arrays 4}

@verbatim
  myarray=(arrays work, too)
  env_parallel -k echo '${myarray[{}]}' ::: 0 1 2
  env_parallel -k -S server echo '${myarray[{}]}' ::: 0 1 2
  env_parallel -k --env myarray echo '${myarray[{}]}' ::: 0 1 2
  env_parallel -k --env myarray -S server \
    echo '${myarray[{}]}' ::: 0 1 2
@end verbatim

@end table

@node mksh
@section mksh

@menu
* Installation 6::
* Supported use 6::
@end menu

@node Installation 6
@subsection Installation

Put this in $HOME/.mkshrc:

@verbatim
  source env_parallel.mksh
@end verbatim

E.g. by doing:

@verbatim
  echo 'source env_parallel.mksh' >> $HOME/.mkshrc
@end verbatim

@node Supported use 6
@subsection Supported use

@strong{--env} is supported to export only the variable, alias, function, or
array with the given name. Multiple @strong{--env}s can be given.

@strong{--session} is supported.

@table @asis
@item aliases
@anchor{aliases 6}

@verbatim
  alias myecho='echo aliases'
  env_parallel myecho ::: work
  env_parallel -S server myecho ::: work
  env_parallel --env myecho myecho ::: work
  env_parallel --env myecho -S server myecho ::: work

  alias multiline='echo multiline
    echo aliases'
  env_parallel multiline ::: work
  env_parallel -S server multiline ::: work
  env_parallel --env multiline multiline ::: work
  env_parallel --env multiline -S server multiline ::: work
@end verbatim

@item functions
@anchor{functions 6}

@verbatim
  myfunc() { echo functions $*; }
  env_parallel myfunc ::: work
  env_parallel -S server myfunc ::: work
  env_parallel --env myfunc myfunc ::: work
  env_parallel --env myfunc -S server myfunc ::: work
@end verbatim

@item variables
@anchor{variables 6}

@verbatim
  myvar=variables
  env_parallel echo '$myvar' ::: work
  env_parallel -S server echo '$myvar' ::: work
  env_parallel --env myvar echo '$myvar' ::: work
  env_parallel --env myvar -S server echo '$myvar' ::: work
@end verbatim

@item arrays
@anchor{arrays 5}

@verbatim
  myarray=(arrays work, too)
  env_parallel -k echo '${myarray[{}]}' ::: 0 1 2
  env_parallel -k -S server echo '${myarray[{}]}' ::: 0 1 2
  env_parallel -k --env myarray echo '${myarray[{}]}' ::: 0 1 2
  env_parallel -k --env myarray -S server \
    echo '${myarray[{}]}' ::: 0 1 2
@end verbatim

@end table

@node pdksh
@section pdksh

@menu
* Installation 7::
* Supported use 7::
@end menu

@node Installation 7
@subsection Installation

Put this in $HOME/.profile:

@verbatim
  source env_parallel.pdksh
@end verbatim

E.g. by doing:

@verbatim
  echo 'source env_parallel.pdksh' >> $HOME/.profile
@end verbatim

@node Supported use 7
@subsection Supported use

@strong{--env} is supported to export only the variable, alias, function, or
array with the given name. Multiple @strong{--env}s can be given.

@strong{--session} is supported.

@table @asis
@item aliases
@anchor{aliases 7}

@verbatim
  alias myecho="echo aliases";
  env_parallel myecho ::: work;
  env_parallel -S server myecho ::: work;
  env_parallel --env myecho myecho ::: work;
  env_parallel --env myecho -S server myecho ::: work
@end verbatim

@item functions
@anchor{functions 7}

@verbatim
  myfunc() { echo functions $*; };
  env_parallel myfunc ::: work;
  env_parallel -S server myfunc ::: work;
  env_parallel --env myfunc myfunc ::: work;
  env_parallel --env myfunc -S server myfunc ::: work
@end verbatim

@item variables
@anchor{variables 7}

@verbatim
  myvar=variables;
  env_parallel echo "\$myvar" ::: work;
  env_parallel -S server echo "\$myvar" ::: work;
  env_parallel --env myvar echo "\$myvar" ::: work;
  env_parallel --env myvar -S server echo "\$myvar" ::: work
@end verbatim

@item arrays
@anchor{arrays 6}

@verbatim
  myarray=(arrays work, too);
  env_parallel -k echo "\${myarray[{}]}" ::: 0 1 2;
  env_parallel -k -S server echo "\${myarray[{}]}" ::: 0 1 2;
  env_parallel -k --env myarray echo "\${myarray[{}]}" ::: 0 1 2;
  env_parallel -k --env myarray -S server \
    echo "\${myarray[{}]}" ::: 0 1 2
@end verbatim

@end table

@node sh
@section sh

@menu
* Installation 8::
* Supported use 8::
@end menu

@node Installation 8
@subsection Installation

Put this in $HOME/.profile:

@verbatim
  . env_parallel.sh
@end verbatim

E.g. by doing:

@verbatim
  echo '. env_parallel.sh' >> $HOME/.profile
@end verbatim

@node Supported use 8
@subsection Supported use

@strong{--env} is supported to export only the variable, or alias with the
given name. Multiple @strong{--env}s can be given.

@strong{--session} is supported.

@table @asis
@item aliases
@anchor{aliases 8}

@verbatim
  sh does not support aliases.
@end verbatim

@item functions
@anchor{functions 8}

@verbatim
  myfunc() { echo functions $*; }
  env_parallel myfunc ::: work
  env_parallel -S server myfunc ::: work
  env_parallel --env myfunc myfunc ::: work
  env_parallel --env myfunc -S server myfunc ::: work
@end verbatim

@item variables
@anchor{variables 8}

@verbatim
  myvar=variables
  env_parallel echo '$myvar' ::: work
  env_parallel -S server echo '$myvar' ::: work
  env_parallel --env myvar echo '$myvar' ::: work
  env_parallel --env myvar -S server echo '$myvar' ::: work
@end verbatim

@item arrays
@anchor{arrays 7}

@verbatim
  sh does not support arrays.
@end verbatim

@end table

@node tcsh
@section tcsh

@strong{env_parallel} for @strong{tcsh} breaks @strong{$PARALLEL}, so do not use
@strong{$PARALLEL}.

@menu
* Installation 9::
* Supported use 9::
@end menu

@node Installation 9
@subsection Installation

Put this in $HOME/.tcshrc:

@verbatim
  source `which env_parallel.tcsh`
@end verbatim

E.g. by doing:

@verbatim
  echo 'source `which env_parallel.tcsh`' >> $HOME/.tcshrc
@end verbatim

@node Supported use 9
@subsection Supported use

@strong{--env} is supported to export only the variable, alias, or
array with the given name. Multiple @strong{--env}s can be given.

@table @asis
@item aliases
@anchor{aliases 9}

@verbatim
  alias myecho 'echo aliases'
  env_parallel myecho ::: work
  env_parallel -S server myecho ::: work
  env_parallel --env myecho myecho ::: work
  env_parallel --env myecho -S server myecho ::: work
@end verbatim

@item functions
@anchor{functions 9}

Not supported by @strong{tcsh}.

@item variables
@anchor{variables 9}

@verbatim
  set myvar=variables
  env_parallel echo '$myvar' ::: work
  env_parallel -S server echo '$myvar' ::: work
  env_parallel --env myvar echo '$myvar' ::: work
  env_parallel --env myvar -S server echo '$myvar' ::: work
@end verbatim

@item arrays with no special chars
@anchor{arrays with no special chars 1}

@verbatim
  set myarray=(arrays work, too)
  env_parallel -k echo \$'{myarray[{}]}' ::: 1 2 3
  env_parallel -k -S server echo \$'{myarray[{}]}' ::: 1 2 3
  env_parallel -k --env myarray echo \$'{myarray[{}]}' ::: 1 2 3
  env_parallel -k --env myarray -S server \
    echo \$'{myarray[{}]}' ::: 1 2 3
@end verbatim

@end table

@node Zsh
@section Zsh

@menu
* Installation 10::
* Supported use 10::
@end menu

@node Installation 10
@subsection Installation

Put this in $HOME/.zshrc:

@verbatim
  . env_parallel.zsh
@end verbatim

E.g. by doing:

@verbatim
  echo '. env_parallel.zsh' >> $HOME/.zshenv
@end verbatim

@node Supported use 10
@subsection Supported use

@strong{--env} is supported to export only the variable, alias, function, or
array with the given name. Multiple @strong{--env}s can be given.

@strong{--session} is supported.

@table @asis
@item aliases
@anchor{aliases 10}

@verbatim
  alias myecho='echo aliases'
  env_parallel myecho ::: work
  env_parallel -S server myecho ::: work
  env_parallel --env myecho myecho ::: work
  env_parallel --env myecho -S server myecho ::: work

  alias multiline='echo multiline
    echo aliases'
  env_parallel multiline ::: work
  env_parallel -S server multiline ::: work
  env_parallel --env multiline multiline ::: work
  env_parallel --env multiline -S server multiline ::: work
@end verbatim

@item functions
@anchor{functions 10}

@verbatim
  myfunc() { echo functions $*; }
  env_parallel myfunc ::: work
  env_parallel -S server myfunc ::: work
  env_parallel --env myfunc myfunc ::: work
  env_parallel --env myfunc -S server myfunc ::: work
@end verbatim

@item variables
@anchor{variables 10}

@verbatim
  myvar=variables
  env_parallel echo '$myvar' ::: work
  env_parallel -S server echo '$myvar' ::: work
  env_parallel --env myvar echo '$myvar' ::: work
  env_parallel --env myvar -S server echo '$myvar' ::: work
@end verbatim

@item arrays
@anchor{arrays 8}

@verbatim
  myarray=(arrays work, too)
  env_parallel -k echo '${myarray[{}]}' ::: 1 2 3
  env_parallel -k -S server echo '${myarray[{}]}' ::: 1 2 3
  env_parallel -k --env myarray echo '${myarray[{}]}' ::: 1 2 3
  env_parallel -k --env myarray -S server \
    echo '${myarray[{}]}' ::: 1 2 3
@end verbatim

@end table

@node EXIT STATUS
@chapter EXIT STATUS

Same as GNU @strong{parallel}.

@node AUTHOR
@chapter AUTHOR

When using GNU @strong{env_parallel} for a publication please cite:

O. Tange (2018): GNU Parallel 2018, March 2018, ISBN 9781387509881,
DOI: 10.5281/zenodo.1146014.

This helps funding further development; and it won't cost you a cent.
If you pay 10000 EUR you should feel free to use GNU Parallel without citing.

Copyright (C) 2007-10-18 Ole Tange, http://ole.tange.dk

Copyright (C) 2008-2010 Ole Tange, http://ole.tange.dk

Copyright (C) 2010-2023 Ole Tange, http://ole.tange.dk and Free
Software Foundation, Inc.

@node LICENSE
@chapter LICENSE

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/>.

@menu
* Documentation license I::
* Documentation license II::
@end menu

@node Documentation license I
@section Documentation license I

Permission is granted to copy, distribute and/or modify this
documentation under the terms of the GNU Free Documentation License,
Version 1.3 or any later version published by the Free Software
Foundation; with no Invariant Sections, with no Front-Cover Texts, and
with no Back-Cover Texts.  A copy of the license is included in the
file LICENSES/GFDL-1.3-or-later.txt.

@node Documentation license II
@section Documentation license II

You are free:

@table @asis
@item @strong{to Share}
@anchor{@strong{to Share}}

to copy, distribute and transmit the work

@item @strong{to Remix}
@anchor{@strong{to Remix}}

to adapt the work

@end table

Under the following conditions:

@table @asis
@item @strong{Attribution}
@anchor{@strong{Attribution}}

You must attribute the work in the manner specified by the author or
licensor (but not in any way that suggests that they endorse you or
your use of the work).

@item @strong{Share Alike}
@anchor{@strong{Share Alike}}

If you alter, transform, or build upon this work, you may distribute
the resulting work only under the same, similar or a compatible
license.

@end table

With the understanding that:

@table @asis
@item @strong{Waiver}
@anchor{@strong{Waiver}}

Any of the above conditions can be waived if you get permission from
the copyright holder.

@item @strong{Public Domain}
@anchor{@strong{Public Domain}}

Where the work or any of its elements is in the public domain under
applicable law, that status is in no way affected by the license.

@item @strong{Other Rights}
@anchor{@strong{Other Rights}}

In no way are any of the following rights affected by the license:

@itemize
@item Your fair dealing or fair use rights, or other applicable
copyright exceptions and limitations;

@item The author's moral rights;

@item Rights other persons may have either in the work itself or in
how the work is used, such as publicity or privacy rights.

@end itemize

@end table

@table @asis
@item @strong{Notice}
@anchor{@strong{Notice}}

For any reuse or distribution, you must make clear to others the
license terms of this work.

@end table

A copy of the full license is included in the file as
LICENCES/CC-BY-SA-4.0.txt

@node DEPENDENCIES
@chapter DEPENDENCIES

@strong{env_parallel} uses GNU @strong{parallel}.

@node SEE ALSO
@chapter SEE ALSO

@strong{parallel}(1), @strong{ash}(1), @strong{bash}(1), @strong{csh}(1), @strong{dash}(1),
@strong{fish}(1), @strong{ksh}(1), @strong{pdksh}(1) @strong{tcsh}(1), @strong{zsh}(1).

@bye
