lua-shepi

Tiny EDSL for shell pipes in lua

$ luarocks install lua-shepi

Lua-shepi uses the package lua-posix in order to provide command chaining using real unix pipes.
Here are some highlights:

- The EDSL uses the same left-to-right evaluation order and the pipe character | that you are familiar with. For instance local pipe = bp.echo('foo bar') | bp.tr('-d', ' ') becomes possible (see the examples further below).
- There are no tempfiles.
- Space complexity for normal shepi pipes is constant (not taking into account the commands in the pipeline of course).
- If you are using the shepi.fork function, space complexity is O(n) = n, because it synchronuously joins the subpipes in order. (n referes to the data input from the subpipes.)
- You can throw lua functions into the pipe. They also do run in a separate process!
- You can reuse your pipes, since they are just regular lua-functions.
- And, of course, there won't be zombie processes (but that's not really a hightlight).

For usage and syntax example (a general showcase), refer to the README.md provided in the github repository. Thank you for your interest.

Versions

1.4-17 years ago219 downloads
1.3-17 years ago48 downloads

Dependencies

lua >= 5.1, < 5.4

Labels

Manifests