I want to be able to run a command inside the bash file and save it in somefile.txt
I am running my script the following way:
- sbatch file.sh and inside this file I have a terminal command
I want to be able to run a command inside the bash file and save it in somefile.txt
I am running my script the following way:
Goal: to capture the output of a particular terminal command when a job is launched using sbatch
Current working solution:
Example:
#!/bin/bash
#SBATCH --job-name application1
#SBATCH --partition=TSA
#SBATCH --nodelist=node52
module load openmpi/1.10.2/gcc/4.9.3
mpirun -np 1 NASA.IS
# I have placed the python call at the end because I want to capture
# the time it took for the application to run and save it to a file
# I was able to code everything inside the python file and generate the
# corresponding data
python outputCollector.py