I have a for loop that accepts a file with one type of extension, but the final command in the pipe requires the STDIN file to have an extension of another type. In my pipe I use awk
to change the file type so that it is properly formatted for the final command, but the extension is still linked to the initial input file.
For example:
for file in *.AAA
do
commandA $file | awk ' { print } ' | commandB
A typical use of commandB:
commandB -i myfile.BBB
Is there a way for me to change the extension of a file in the middle of a for loop & pipe?