Hi ! all
I have need of accessing multiple files of different type same base name, and I want to compare base name if matching then I want to send those 2 files of different type to some program, for further processing
my files are like this
file_1.txt
file_2.txt
file_3.txt
file_4.txt
file_6.txt
file_8.txt
file_1.asc
file_2.asc
file_3.asc
file_4.asc
file_7.asc
First I want to save file names in some array like this
file_type1 array
file_type2 array
now compare file_type1 array and file_type2 array
first send base name matched files as a variable to sub program say
variable name txt for .txt file
and
variable name asc for .asc file
program is something like this
awk .................'{}' $txt
awk ..................'{}' $asc
once matched file ends, then send only one variable from unmatched file array, to sub program one by one
expected output
if I do echo $txt $asc should result like below
file_1.txt file_1.asc
file_2.txt file_2.asc
file_3.txt file_3.asc
file_4.txt file_4.asc
file_6.txt
file_7.asc
file_8.txt
Hope this will be possible with your help