Hello. I am new here. I have Linux experience but it is fairly limited. I have been trying to find a solution to the following problem:
I have a directory that contains multiple files. First, I need to find all files with an extension of ".trg" I have successfully done this using the find command:
this provides me with two filenames in the param variable:
I need to take the text prior to the .trg (so ABC1099 from the first occurrence) and then find the associated filename with a .dat extension.
I tried using string operators but was unsuccessful. Maybe I should be using some kind of array processing?
Any help would be greatly appreciated.