cheat sheets.

$ cheat bash_if
Compound commands 

   [[ expr_cond ]]

   - Permissions
       * -r
       * -w
       * -x

   - Entry type
       * -f : existing file
       * -d : existing directory

       + ex:
           if [[ -f $1 ]]

   - Option state
       * -o : option true if internal command is set on

Double ifs

   if [[ exp1 && exp2 ]]

   if [[ !(exp1 || exp2) ]]
Version 1, updated 353 days ago.
. o 0 ( edit | history )
( add new | see all )