github.com/theclapp/sh@v2.6.4+incompatible/syntax/canonical.sh (about) 1 #!/bin/bash 2 3 # separate comment 4 5 ! foo bar >a & 6 7 foo() { bar; } 8 9 { 10 var1="some long value" # var1 comment 11 var2=short # var2 comment 12 } 13 14 if foo; then bar; fi 15 16 for foo in a b c; do 17 bar 18 done 19 20 case $foo in 21 a) A ;; 22 b) 23 B 24 ;; 25 esac 26 27 foo | bar 28 foo && 29 $(bar) && 30 (more) 31 32 foo 2>&1 33 foo <<-EOF 34 bar 35 EOF 36 37 $((3 + 4))