![Forrest logo](/images/logo.png)
parallel:tldr:c3284
parallel: Run on multiple machines via SSH.
$ parallel -S ${machine1},${machine2} ${command} ::: ${arg1} ${arg2}
try on your machine
This command executes the given command in parallel on multiple machines, specified by the variables ${machine1}
and ${machine2}
.
Here is a breakdown of the command structure:
parallel
: This is the command being executed, which is likely the GNU Parallel command-line utility.-S
: This option specifies the remote machines on which the command should be executed in parallel.${machine1},${machine2}
: These variables define the list of machines on which the command will be executed. The exact values of${machine1}
and${machine2}
would need to be defined elsewhere in the script or command.${command}
: This variable specifies the command that will be executed in parallel on the specified machines. The exact value of${command}
would also need to be defined elsewhere.:::
: This separator is used to separate the list of target machines from the list of arguments.${arg1} ${arg2}
: These variables represent the arguments that will be passed to the command. The exact values of${arg1}
and${arg2}
would need to be defined elsewhere in the script or command.
By combining these elements, the parallel
command will execute ${command}
in parallel on ${machine1}
and ${machine2}
, with ${arg1}
and ${arg2}
as the arguments.
This explanation was created by an AI. In most cases those are correct. But please always be careful and
never run a command you are not sure if it is safe.