How would you improve this shell script to check for errors before executing each task?
126951
Shell scripting: die on any error
20125
How do I syntax check a Bash script without running it?
82733
How can I run a specific command for each find result?
145042
Somehow I created a nondeterministic sh script
76643
How to handle more than 10 parameters in shell
12251
How to redirect output of an entire shell script within the script itself?
50022
Different ways to execute a shell script
34250
Catching module loading errors and processing them
90600
How to get error output and store it in a variable or file
16672
Shell script check if file exists?
119927
How to repeat prompt to user in a shell script?
10335
Best way to copy all files, ignoring errors?
141045
Linux Script to check if process is running and act on the result
103249
error in shell scripting?
89777
What are the security issues and race conditions in using `find -exec`?
42934
How can the order of execution in the shell as it relates to redirection be upset about 1 time out of a 1000 on my system?
115854
How to identify the process that's sending error messages to terminal?