| 1 | #!/bin/bash |
| 2 | # stupid-script-tricks.sh: Don't try this at home, folks. |
| 3 | # From "Stupid Script Tricks," Volume I. |
| 4 | |
| 5 | exit 99 ### Comment out this line if you dare. |
| 6 | |
| 7 | dangerous_variable=`cat /boot/vmlinuz` # The compressed Linux kernel itself. |
| 8 | |
| 9 | echo "string-length of \$dangerous_variable = ${#dangerous_variable}" |
| 10 | # string-length of $dangerous_variable = 794151 |
| 11 | # (Newer kernels are bigger.) |
| 12 | # Does not give same count as 'wc -c /boot/vmlinuz'. |
| 13 | |
| 14 | # echo "$dangerous_variable" |
| 15 | # Don't try this! It would hang the script. |
| 16 | |
| 17 | |
| 18 | # The document author is aware of no useful applications for |
| 19 | #+ setting a variable to the contents of a binary file. |
| 20 | |
| 21 | exit 0 |