I went looking around for bash scripting tips, especially secure coding of bash. Can't find much information, so decided to consolidate whatever I found here. 
if [[ "a$?" == "a4" ]]; then
/bin/grep "hardcoding the full path" *
echo=/bin/echo
${echo} "From bash manpage under EXPANSION:
The order of expansions is: brace expansion, tilde expansion, parameter,
variable and arithmetic expansion and command substitution (done in a
left-to-right fashion), word splitting, and pathname expansion."
#!/bin/bash
# comments
PATH=/bin:/usr/bin
function print_usage () {
${echo} "
$0
Usage: $0 [-a opts] [arguments]
or $0 -h
Description: Something fishy
Options:
-a opts (Optional) Options
-h (Optional) Help
arguments Smelly smelly fish
"
}
if [ $# -lt 2 ]; then
print_usage
exit 1
else
while getopts ha:b: options; do
case "${options}" in
h) print_usage
exit 1
;;
a) flag=${options}
;;
b) flag=${options}
;;
*) echo "default case, everything else fits here"
;;
esac
done
shift $((${OPTIND} - 1))
a=erie
ab=were
if [[ "${a}b" == "erieb" ]]; then