plumb plumb 2012-04-11


plumb - the pipe shell


plumb [-I directory] [-v name value] [-f script_name] [script]


Plumb interprets a plumb(5) script and builds a graph of pipes between real and virtual processes. For more information about how this is done see plumb(7). The script may be given in multiple snippets (scripts from command line arguments or files). Plumb will interpret/execute arguments sequentially, in order (so order of arguments does matter): search paths and variables are set and scripts are parsed each as a separate transaction. The main loop (any data flow) starts after all arguments are parsed.

-I directory add directory to the include search path
-v name value set plumb variable name to value
-f script_name load the next script (transaction) from file script_name
script an argument not starting with "-" and not being a parameter of another "-" argument is taken as an in-line script (transaction) and is parsed and executed from the command line argument string


plumb 'env:0 | {foo} | h=[hub] | env:1; {bar 42} | h:*'

One-liner with stdio (thbe system-wide plumblib directory is on the
search path by default):
plumb 'env:0 | {foo} | stdout:*; {bar 42} | stdout:*'

The same script read from file foobar.pb:
plumb -f foobar.pb

If the plumb script also requires arguments:
plumb -v num 42 'env:0 | {foo} | stdout:*; {bar $num} | stdout:*'
plumb -v num 42 -f foobar.pb

Running the same script and also print all events to stderr:
plumb -v num 42 -f foobar.pb 'event:* | stderr:*'


plumb plumb 2012-04-11