Bash scripts are so painful...