Bash script for academic writing and hw