README: add build instructions
[rofl0r-jobflow.git] / README.md
blob30ef13a33c4f3d46289ec79ab0fea1314a660592
1 jobflow by rofl0r
2 =================
4 this program is inspired by GNU parallel, but has the following differences
6  + written in C (orders of magnitude less memory used, a few KB vs 50-60 MB)
7  + does not leak memory
8  + much faster
9  + supports rlimits passed to started processes
10  - doesn't support ssh (usage of remote cpus)
11  - doesn't support all kinds of argument permutations
13 basically, it works by processing stdin, launching one process per line.
14 the actual line can be passed to the started program as an argv.
15 this allows for easy parallelization of standard unix tasks.
17 it is possible to save the current processed line, so when the task is killed
18 it can be continued later.
20 example usage
21 -------------
23 you have a list of things, and a tool that processes a single thing.
25     cat things.list | jobflow -threads=8 -exec ./mytask {}
27     seq 100 | jobflow -threads=100 -exec echo {}
29     cat urls.txt | jobflow -threads=32 -exec wget {}
31     find . -name '*.bmp' | jobflow -threads=8 -exec bmp2jpeg {.}.bmp {.}.jpg
33 run jobflow without arguments to see a list of possible command line options,
34 and argument permutations.
36 BUILD
37 -----
39     cd /tmp
40     mkdir jobflow-0000
41     cd jobflow-0000/
42     git clone https://github.com/rofl0r/libulz lib
43     git clone https://github.com/rofl0r/jobflow
44     git clone https://github.com/rofl0r/rcb
45     export PATH=$PATH:/tmp/jobflow-0000/rcb
46     ln -s /tmp/jobflow-0000/rcb/rcb.pl /tmp/jobflow-0000/rcb/rcb
47     cd jobflow
48     CC="gcc -static" CFLAGS="-O0 -g -Wall -Wextra" rcb jobflow.c