3 ms·
$ mkfifo ~/.jobqueue $ parallel :::: ~/.jobqueue now, from another terminal: echo ls > ~/.jobqueue Tada! for a remote job queue, use nc instead of a f
by justin_vanw 11y ago
$ mkfifo ~/.jobqueue
$ parallel :::: ~/.jobqueue
now, from another terminal:
echo ls > ~/.jobqueue
Tada!
for a remote job queue, use nc instead of a fifo
for a job queue with a buffer, use a file, and run
$ parallel :::: <(tail -f thefile)
you can even truncate the file from time to time.
Of course, this doesn't capture the context you are in, such as your current directory or the value of shell variables.
- giis 11y agoWhat's 'parallel'? Is it a *nix command? Looks like its not available on Fedora box
- teraflop 11y agoYes, it's a GNU tool. Try "yum install parallel". http://www.gnu.org/software/parallel/ http://www.gnu.org/software/parallel/
- kovek 11y agoHere is an alternative: tty1$ mkfifo /tmp/jobqueue tty1$ eval $(tail -n 1 /tmp/jobqueue) And then, in another terminal: tty2$ echo ls > /tmp/jobqueue