Is there a way to do this, or a better approach?
I have a logical error in my script and want to execute it line by line, pausing after each line so I can see what is happening (checking variables, viewing files, etc) before executing the next line. I have placed
echo var = $var and
cat file statements after a lot of the lines, but that has been confusing and I am thinking there must be a better way. (btw, I am not looking for a program to run, but want to do it with commands)