LDP/LDP/guide/docbook/abs-guide/stupid-script-tricks.sh

22 lines
644 B
Bash
Raw Normal View History

2002-04-01 16:05:47 +00:00
#!/bin/bash
# stupid-script-tricks.sh: Don't try this at home, folks.
2002-07-22 15:11:51 +00:00
# From "Stupid Script Tricks," Volume I.
2002-04-01 16:05:47 +00:00
2012-11-27 14:56:18 +00:00
exit 99 ### Comment out this line if you dare.
2002-04-01 16:05:47 +00:00
dangerous_variable=`cat /boot/vmlinuz` # The compressed Linux kernel itself.
echo "string-length of \$dangerous_variable = ${#dangerous_variable}"
# string-length of $dangerous_variable = 794151
2012-11-27 14:56:18 +00:00
# (Newer kernels are bigger.)
# Does not give same count as 'wc -c /boot/vmlinuz'.
2002-04-01 16:05:47 +00:00
# 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