Quote:
Originally Posted by whizje
Ok do you have a alternative for the redirection operator.
|
The file identifier for my program is
/home/daniel/Desktop/LQfiles/dbm678.bin
The input files, work files, and the output file are all located in the same folder and with similar file names.
All of the file names start with
/home/daniel/Desktop/LQfiles/dbm678
This code ...
Code:
Path=$(cut -d'.' -f1 <<< ${0})
... produces this desirable result ...
Code:
/home/daniel/Desktop/LQfiles/dbm678
... but you could hard code it thusly ...
Code:
Path="/home/daniel/Desktop/LQfiles/dbm678"
The output file is
/home/daniel/Desktop/LQfiles/dbm678out.txt
The input files are ...
Code:
/home/daniel/Desktop/LQfiles/dbm678inp1.txt
/home/daniel/Desktop/LQfiles/dbm678inp2.txt
/home/daniel/Desktop/LQfiles/dbm678inp3.txt
/home/daniel/Desktop/LQfiles/dbm678inp4.txt
/home/daniel/Desktop/LQfiles/dbm678inp5.txt
... and the corresponding work files are ...
Code:
/home/daniel/Desktop/LQfiles/dbm678w1.txt
/home/daniel/Desktop/LQfiles/dbm678w2.txt
/home/daniel/Desktop/LQfiles/dbm678w3.txt
/home/daniel/Desktop/LQfiles/dbm678w4.txt
/home/daniel/Desktop/LQfiles/dbm678w5.txt
The OP would have to substitute appropriate file identifiers for his computer.
They might be of the form ...
Code:
/home/cheah/What/Ever/dbm678.bin
... and ...
/home/cheah/What/Ever/dbm678inp1.txt
... and ...
/home/cheah/What/Ever/dbm678w1.txt
... and ...
/home/cheah/What/Ever/dbm678out.txt
If there are 12 input files he would need input file identifiers numbered 1 through 12, and corresponding work files numbered 1 through 12.
Daniel B. Martin