This page has moved to http://wiki.lustre.org/Lustre_Script_Coding_Style

  • No labels

2 Comments

  1. Prefer 'if ! [[ $x = $y ]]; then error "x != y"; fi' to 'if [[ $x != $y ]]; then error "x != y"; fi'. Since the second form gives a false pass when x or y is not initialized correctly.

    1. test "X$x" = "X$y" || die 'x and y differ'

      There are several reasons why it is helpful to do string comparisons using a prefix and quoting them.  The reasons are numerous and do not go away for different flavors of "test".