Working on shell script, needs to be refactored for readability and then modified for assignment 6