VirtualTam's bookmarks

  1. The format of here-documents is:

    1[n]<<[-]word
    2        here-document
    3delimiter
    

    If any part of word is quoted, the delimiter is the result of quote removal on word, and the lines in the here-document are not expanded.

    This is useful to write scripts that:

    • write scripts (verbatim)
    • execute a sequence of commands (verbatim) on a remote host
  2. 1$ pip install howdoi
    2$ howdoi format date bash
    3> DATE=`date +%Y-%m-%d`
    
  3.  -e      Exit  immediately  if a pipeline (which may consist of a
     single simple command),  a subshell command enclosed in parentheses,
     or one of the commands executed as part of a command list enclosed by
     braces (see SHELL GRAMMAR above) exits with a non-zero  status. 
    
     -x      After expanding each simple command, for command, case
     command, select command, or arithmetic  for  command,  display
     the  expanded value of PS4, followed by the command and its
     expanded arguments or associated word list.