This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Lyqyd's profile picture

lsh - A shell with pipes.

Started by Lyqyd, 05 October 2015 - 03:04 AM
Lyqyd #1
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
More programs are planned to take full advantage of the ability to pipe text around. Lsh is included with LyqydOS, or you can download it separately from github. The best way to get lsh is via packman, with the command packman install lsh, as this will fetch lsh and its associated programs automatically.

Screenshot
クデル #2
Posted 05 October 2015 - 06:58 AM
You sir, are beautiful
LewisTehMinerz #3
Posted 24 October 2015 - 09:22 AM
Okay, now I'm gonna get confused with NSH and LSH… xD