loop 1.0 review
Downloadloop will run several commands with varied arguments in parallel, with a maximum of n running at any given time
|
|
loop will run several commands with varied arguments in parallel, with a maximum of n running at any given time. loop project is suitable for parallelized remote command execution via SSH or similar, but not limited to that.
Usage:
seki-strombrg> loop
usage:
/dcslib/allsys/etc/loop -d save directory
/dcslib/allsys/etc/loop -n max concurrent proc
/dcslib/allsys/etc/loop -c command to execute
/dcslib/allsys/etc/loop -v (verbose)
stdin should consist of filename arguments
for each command to execute
Sun Jan 01 11:06:37
Example usage (from memory) might look like:
mkdir -p /tmp/savedir
rm /tmp/savedir/*
cat /tmp/hostname-list-one-host-per-line | sed 's/^(.*)$/1 1/' | loop -d /tmp/savedir -n 20 -c 'uname -n' -v
/tmp/savedir should then have one file per host, each containing the results from the command on each host. Then review the results with something like:
vi /tmp/savedir/* # look at all the files
vi $(ls /tmp/savedir | equivs2 -s | awk ' { print $1 } ') # only look at a single copy of any files that have the same content.
loop 1.0 search tags