Posted 05 October 2015 - 05:04 AM
Shells that implement a piping/redirection system have been posted a few times in the forums. LyqydShell, or lsh, is yet another entry on the list. It uses the io API to redirect the input and output of the programs you run in it. Any program that takes input via io.read and provides output via io.write can be piped into or out of. Lsh comes with some programs that take advantage of the pipe infrastructure. Currently, they are:
- cat, takes a file name as an argument and writes the contents to stdout.
- glpp, a grep-alike that uses lua patterns.
- less, a simple paging program that accepts input from stdin.
- list, a replacement for the built-in list program that outputs to stdout.
- tee