Skip to content
Nathan Sketch edited this page Mar 8, 2022 · 142 revisions

Links to Unix Shells, Languages, Libraries, Implementations, Research, and More

 

 

You probably came here for one of these pages:

 

 

POSIX Shells

See the list starting at https://www.oilshell.org/cross-ref.html#bash

  • GNU bash -- most popular shell in the world, on Linux, Mac, Windows
  • ksh / pdksh / mksh -- ksh was a proprietary extension of the original Bourne shell; pdksh was an open source clone of ksh; mksh is a fork of pdksh and used on Android.
  • dash / busybox ash (same lineage)
  • busybox hush -- shell in one file.
  • yash -- Yash, yet another shell, is a POSIX-compliant command line shell written in C99 (ISO/IEC 9899:1999). Yash is intended to be the most POSIX-compliant shell in the world while supporting features for daily interactive and scripting use. -- Has Debian and Fedora packages.
  • zsh (not POSIX compatible by default)

Shell Parsers

  • ShellCheck -- Written in Haskell, using the parser combinator style. (No seperate lexer).
  • shfmt -- Shell auto-formatter like gofmt, written in Go.
  • sh-parser -- parsing POSIX shell with Lua's LPEG
  • morbig -- from Colis project, parsing POSIX shell, FOSDEM Talk. alias makes parsing undecidable too!
  • https://github.com/idank/bashlex -- bashlex is a Python port of the parser used internally by GNU bash. For the most part it's transliterated from C ... I wrote this library for another project of mine, explainshell which needed a new parsing backend to support complex constructs such as process/command substitutions.
  • tree-sitter-bash -- grammar.js is 512 lines? There's also C++ code?

Academic Projects

TODO: Add links here.

Find-like Languages

Awk- and Sed-like Languages

Tab Language -- An interesting statically-typed, non Turing complete language that apparently fills the niche of Awk. Written in C++.

Miller (Language Reference) -- Miller is like awk, sed, cut, join, and sort for name-indexed data such as CSV, TSV, and tabular JSON. Written in C.

TXR -- TXR is a pragmatic, convenient tool ready to take on your daily hacking challenges with its dual personality: its whole-document pattern matching and extraction language for scraping information from arbitrary text sources, and its powerful data-processing language to slice through problems like a hot knife through butter. Many tasks can be accomplished with TXR "one liners" directly from your system prompt. There is a TXR Lisp and then it is embedded in a pattern language. Sort of like the reverse of a template language?

jq -- jq is like sed for JSON data - you can use it to slice and filter and map and transform structured data with the same ease that sed, awk, grep and friends let you play with text. Written in C.

These projects are dormant:

r17 (Github, written in C++) -- A flexible, scalable, relational data mining language. No releases since 2013.

  • r17's syntax is a cross between UNIX shell and SQL.
  • Built-in concurrency, including cross-machine concurrency.
  • Strong type checking at stream-header-read time.

streem (by Matz, creator of Ruby, written in C with yacc grammar) -- Streem is a stream based concurrent scripting language. It is based on a programming model similar to the shell, with influences from Ruby, Erlang, and other functional programming languages.

Scientific Workflow Languages

Scientific Workflow System on Wikipedia has a huge list.

  • Cuneiform -- Cuneiform combines the strong points of functional programming languages, distributed databases, and workflow management systems.
  • Nextflow -- an external DSL, e.g. process { }. Nextflow enables scalable and reproducible scientific workflows using software containers. It allows the adaptation of pipelines written in the most common scripting languages.
  • Common Workflow Language -- The Common Workflow Language (CWL) is a specification for describing analysis workflows and tools in a way that makes them portable and scalable across a variety of software and hardware environments, from workstations to cluster, cloud, and high performance computing (HPC) environments. CWL is designed to meet the needs of data-intensive science, such as Bioinformatics, Medical Imaging, Astronomy, Physics, and Chemistry.
  • SciPipe -- SciPipe is a library for writing scientific workflows (sometimes also called "pipelines") of shell commands that depend on each other, in the Go programming language
  • HN thread on dgsh mentions many similar systems.

Shell Complements

  • ShellJs -- This is the opposite of a shell in JavaScript -- it's all the Unix utilities in JavaScript, and you use JS as your shell language.
  • OCamp -- OCamp extends unix shells with constructions to express memoization, sharing of computations and reactive programming. Written in OCaml.
  • TODO: There was one about calling C functions from shared libraries.
  • asdf -- not really a library, but a language-independent version manager

Pages with Collections of Links

Notes on Shell Implementation

Clone this wiki locally