| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
: <<COMMENTBLOCK |
| 5 |
echo "This line will not echo." |
| 6 |
This is a comment line missing the "#" prefix. |
| 7 |
This is another comment line missing the "#" prefix. |
| 8 |
|
| 9 |
&*@!!++= |
| 10 |
The above line will cause no error message, |
| 11 |
because the Bash interpreter will ignore it. |
| 12 |
COMMENTBLOCK |
| 13 |
|
| 14 |
echo "Exit value of above \"COMMENTBLOCK\" is $?." |
| 15 |
|
| 16 |
echo |
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
echo "Just before commented-out code block." |
| 26 |
|
| 27 |
|
| 28 |
: <<DEBUGXXX |
| 29 |
for file in * |
| 30 |
do |
| 31 |
cat "$file" |
| 32 |
done |
| 33 |
DEBUGXXX |
| 34 |
|
| 35 |
echo "Just after commented-out code block." |
| 36 |
|
| 37 |
exit 0 |
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
: <<COMMENTBLOCK |
| 51 |
echo "This line will not echo." |
| 52 |
&*@!!++= |
| 53 |
${foo_bar_bazz?} |
| 54 |
$(rm -rf /tmp/foobar/) |
| 55 |
$(touch my_build_directory/cups/Makefile) |
| 56 |
COMMENTBLOCK |
| 57 |
|
| 58 |
|
| 59 |
$ sh commented-bad.sh |
| 60 |
commented-bad.sh: line 3: foo_bar_bazz: parameter null or not set |
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
: <<'COMMENTBLOCK' |
| 65 |
|
| 66 |
|