Simple Newbie-esque script using cd command
I am trying to write a script that cds into different directories to run a script (called code).
I wrote the script (called script) in a directory with this pathway (/projects):
... and so on and so forth, for several more.
I know this is very basic, and poor programming that could be condensed, but that is not my question. ohmy.gif)
For now, I just want to run this script so that I do not have to manually repeat the process directly into the terminal. If I were to type the lines in the script above (minus the header line of #!/bin/bash), each step should work. However, after the script called code is initiated in each directory, it takes about 15 minutes to complete (and produces several files).
However, after performing the command (chmod 666 script), followed by the simple command (script), all that happens is I get a message (Script started, output file is typescript) and then the typescript file says (Script started on Wed Nov 7 11:56:17 2012).
I believe the program then terminates because otherwise there should be files produced in each directory as a result of the code running there each time taking about 15 minutes as well.
Any advice on the source of the problem? Thank you in advance!