I wrote a script that reads each file in a directory, does something and outputs results from each input file to two different files, e.g. "outfile1.txt" and "outfile2.txt". I want to be able to link my resulting files to original ones, so how can I add input filename (infile.txt) to the resulting filenames, to get something like this:
infile1_outfile1.txt, infile1_outfile2.txt
infile2_outfile1.txt, infile2_outfile2.txt
infile3_outfile1.txt, infile3_outfile2.txt ...?
Thanks for any help!