Wrote bash script for homework 2