Pexec

Pexec

pexec is a command-line driven utility for Linux or other Unix-like operating systems which allows the user to execute "for ~ do ~ done" like shell loops in parallel. The specified command or (a piece of) script can be executed on both local and remote host computers, in the case of remote execution, ssh is used to build a secure tunnel between the hosts. Like in shell loops, a pre-defined shell (environmental) variable is varied during the loop which is passed transparently to the command or script. pexec is a free software, available [ [http://sourceforge.net/projects/shellpexec http://sourceforge.net/projects/shellpexec] ] under the terms of GPLv2.

Usage

The most common usage is to replace the shell loop, for example

for x in alpha bravo charlie delta echo ; do do_something $x done

to the form of

pexec -r alpha bravo charlie delta echo -e x -o - -c 'do_something $x'

where the set with the 5 elements of "alpha" "bravo" "charlie" "delta" and "echo" defines the possible values for the (environmental)variable $x. The program pexec features also
* automatic redirection of standard input, output and error from/to regular files;
* taking the input set from a file instead of command line argument;
* the capability for re-formatting the output and error streams;
* support for mutual exclusions and atomic command executions inside the shell loop (e.g. in order to avoid unexpectedly high I/O load);
* using alternative remote shells instead of ssh.Such optional features can be requested using command-line arguments. By default, pexec tries to detect the number of CPUs and uses all of them.

References

External links

* [http://shellpexec.sourceforge.net/man/pexec.1.html Manual page of pexec]
* [http://sourceforge.net/projects/shellpexec Project page]


Wikimedia Foundation. 2010.

Игры ⚽ Нужна курсовая?

Look at other dictionaries:

  • PWB shell — The PWB shell (also known as the Mashey shell) was an early Unix shell.[1] Distributed with some versions of Programmer s Workbench UNIX circa 1975 1977, it was a modified (and generally constrained to be upward compatible) version of the… …   Wikipedia

  • Список пакетов GNU — Это список программного обеспечения, разрабатываемого Free Software Foundation как часть проекта GNU  UNIX подобной операционной системы состоящей целиком из свободного программного обеспечения. Большая часть из этих пакетов также… …   Википедия

  • GNU parallel — Développeur Projet GNU Dernière version …   Wikipédia en Français

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”