system information
------------------

  hostname() --> text
  date()     --> text               # ISO date: YYYY-MM-DD
  datestamp() --> text              # date/time as YYYY-MM-DD-hh-mm-ss

command execution
-----------------

  q_exec( cmd ) --> int             # execute with redirections (>, >>,...)
  q_exec_put( cmd, text ) --> int   # execute cmd with stdin from text
  q_exec_get( cmd ) --> [int, text] # execute cmd and return output


text utilities
--------------

  split( text, seps ) --> text[]
  sub( text, off, len ) --> text
  skipl( text ) --> text
  skipr( text ) --> text
  compress( text ) --> text
  squeeze( text ) --> text

  pos( text, text ) --> int
  tcontains( text, text ) --> boolean
  bool( text ) --> boolean

  subst_chars( text, a, b ) --> text
  del_chars( text, a ) --> text
  subst( text, a, b, n ) --> text
  subst_env( text ) --> text
  add_prefix( text[], text ) --> text[]
  add_suffix( text[], text ) --> text[]


file system utilities
---------------------

  pn -> pathname: text
  dir -> pn
 
  ( not yet; really needed?
    pn_native( pn ) --> text
    pn_posix( pn ) --> text
    pn_win( pn ) --> text
    pn_root( pn ) --> text
    pn_sep() --> text
  )

  fs_exists( pn ) --> boolean
  fs_readable( pn ) --> boolean
  fs_writable( pn ) --> boolean
  fs_executable( pn ) --> boolean
  fs_isdir( pn ) --> boolean
  fs_isfile( pn ) --> boolean

  fs_lsdirs( pn, baseonly ) --> text[]
  fs_lsfiles( pn, baseonly ) --> text[]

  ( fs_canonical_pn( pn ) --> text )

  fs_touch( pn )                    # update access time of file
  fs_rm( pn )                       # remove file
  fs_rmdir( pn )                    # remove dir
  fs_rmrec( pn )                    # remove dir and everything below

  fs_mkdir( pn )                    # create directories (mkdir -p)
  
  fs_cp( pn, pn )                   # copy file
  fs_contents( pn ) --> text        # return file contents as text
  fs_putfile( pn, text )            # (over)write text into file


directory stack
---------------

  pushd( dir )
  popd()
  cd( dir )
  getwd() --> text


