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