2 - number. Haskell The following Haskell program is a one-liner: it sorts its input lines ASCIIbetically. main = (mapM_ putStrLn . Data.List.sort . lines) =<< getContents -- In ghci a qualified name like Data.List.sort will work, although as a standalone executable you'd need to import Data.List. An even shorter version: main = interact (unlines . Data.List.sort . lines) -- Ditto. Usable on the command line like: cat filename | ghc -e "interact (unlines . Data.List.sort . lines)" Racket The following Racket program is equivalent to the above Haskell example: #lang racket (for-each displayln (sort (port->lines) string<?)) and this can be used on the command line as follows: racket -e '(for-each displayln (sort (port->lines) string<?))' Python Performing one-liners directly on the Unix command line can be accomplished by using Python's -cmd flag (-c for short), and typically requires the import of one or more modules. Statements are separated using ";" instead of newlines. For example, to print the last field of unix long listing: ls -l | python -c "import sys;[sys.stdout.write(' '.join([line.split(' ')[-1]])) for line in sys.stdin]" Python wrappers Several open-source scripts have been developed to facilitate the construction of Python one-liners. Scripts such as pyp or Pyline import commonly used modules and provide more human-readable variables in an attempt to make Python functionality more accessible on the command line. Here is a redo of the above example (printing the last field of a unix long listing): ls -l | pyp "whitespace[-1]" # "whitespace" represents each line split on white space in pyp ls -l | pyline "words[-1]" # "words" represents each line split on white space in pyline Executable libraries The Python CGIHTTPServer module for example is also an executable library that performs as a web server with CGI. To start the web server enter: $ python -m CGIHTTPServer Serving HTTP on 0.0.0.0 port 8000 … Tcl Tcl (Tool Command Language) is a dynamic programming/scripting language based on concepts of Lisp, C, and Unix shells. It can be used interactively, or by running scripts (programs) which can use a package system for structuring. Many strings are also well-formed lists. Every simple word is a list of length one, and elements of longer lists are separated by whitespace. For instance, a string that corresponds to a list of three elements: set example {foo bar grill} Strings with unbalanced quotes or braces, or non-space characters directly following closing braces, cannot be