Hi Friends,
I have a script like this
cat script
#!/bin/bash
#Name: name
#Task: name
#$ -e /path/to/error/logfile/err.log
#$ -o /path/to/output/logfile/out.log
I have a list of commands like this
cat commands
cat 1.txt > 2.txt
cat 23.bed > 789.alm
zcat 1.gz > 1.txt
My request is that
Now for each line in my command file, I would like to make a script file. So, that I get 3 script files with increasing err and out log file numbers like this.
cat script1
#!/bin/bash
#Name: name
#Task: name
#$ -e /path/to/error/logfile/err1.log
#$ -o /path/to/output/logfile/out1.log
cat 1.txt > 2.txt
cat script2
#!/bin/bash
#Name: name
#Task: name
#$ -e /path/to/error/logfile/err2.log
#$ -o /path/to/output/logfile/out2.log
cat 23.bed > 789.alm
cat script3
#!/bin/bash
#Name: name
#Task: name
#$ -e /path/to/error/logfile/err3.log
#$ -o /path/to/output/logfile/out3.log
zcat 1.gz > 1.txt
It is basically joining two text files with increasing err and out log file names.
The path to the err and out files is always the same.
Thanks in advance.