mirror of https://github.com/tLDP/LDP
22 lines
644 B
Bash
22 lines
644 B
Bash
#!/bin/bash
|
|
# stupid-script-tricks.sh: Don't try this at home, folks.
|
|
# From "Stupid Script Tricks," Volume I.
|
|
|
|
exit 99 ### Comment out this line if you dare.
|
|
|
|
dangerous_variable=`cat /boot/vmlinuz` # The compressed Linux kernel itself.
|
|
|
|
echo "string-length of \$dangerous_variable = ${#dangerous_variable}"
|
|
# string-length of $dangerous_variable = 794151
|
|
# (Newer kernels are bigger.)
|
|
# Does not give same count as 'wc -c /boot/vmlinuz'.
|
|
|
|
# echo "$dangerous_variable"
|
|
# Don't try this! It would hang the script.
|
|
|
|
|
|
# The document author is aware of no useful applications for
|
|
#+ setting a variable to the contents of a binary file.
|
|
|
|
exit 0
|