Exercise 5c: Running Multiple Scripts
If more than one Pre script is to be run before the executable, it needs to be defined in the submit file:
Create exercise5c.sub using the following:
executable = welcome.sh output = output/ex_05.$(ClusterId).$(ProcId).out error = error/ex_05.$(ClusterId).$(ProcId).err log = log/ex_05.$(ClusterId).log transfer_input_files = your_path/file01.sh, your_path/file02.sh +PreCmd = "file01.sh" queue +PreCmd = "file02.sh" queue
The script file01.sh contains :
#!/bin/bash echo "Hello! I am exercise number 5 "> exercise05-01.txt
The script file02.sh contains :
#!/bin/bash echo "Hello! I am exercise number 5 "> exercise05-02.txt
Execute condor_submit exercise5c.sub to submit the job.
Note: Two different Pre scripts can not be defined as:
+PreCmd = "file01.sh", "file02.sh"
This will not be accepted as a known command.
The following will also fail:
+PreCmd = "file01.sh" +PreCmd = "file02.sh" queue
In this case only the second Pre script will be executed.