Shell script completes running halfway through script
I am fairly new with shell scripting and I have a script that I was asked to update (was written in 2002).
Avoid the duplication in the script
The code below is duplicated twice in the full script, how to avoid it?