The UNIX abstraction

  • In UNIX, all logic is represented by processes, and all data by files
  • One could describe the file (descriptor) as an abstract data type that supports read/write/poll/... operations
  • Describe the data flow to display this presentation (X - ff - apache - files)
  • Shell script is a language designed to manipulate UNIX's files and processes
    • tr -dc '[:alpha:]' < /dev/urandom > /dev/tty
      • < and > read and write the filesystem namespace
    • tr -dc '[:alpha:]' < /dev/urandom
      • shell designed for interactive use, ∴ connects to/from tty implicitly
    • tr -dc '[:alpha:]' < /dev/urandom | dd conv=lcase
    • tr -dc '[:alpha:]' < /dev/urandom | dd cbs=60 conv=lcase,unblock
      • convert from blocks to lines
    • tr -dc '[:alpha:]' < /dev/urandom | dd cbs=60 conv=lcase,unblock |
      GREP_COLOR=7 grep --color '[aeiou]'
      • regular expressions very useful