I have multiple text files in a folder that I want to process through gawk, rather than process them each individually is it possible I can process them all at once without merging them into 1 .txt file
Example of script -
"C:\cygwin64\bin\gawk.exe" -F: 'FNR==NR{a[$1]=$2;next} $2 in a{print $1 FS a[$2]}' email.phone.txt username.email.txt > username.phone.txt
Example of usage -
email.phone.txt - contains:
[email protected]:phoneexample
username.email.txt - contains:
user1:[email protected]
user131:[email protected]
EXPECTED OUTPUT:
user1:phoneexample
user131:phoneexample
but rather than process one of
email.phone.txt
files could i process a directory full of them?
Example -
C:/directory/folder/example
containing:
file1.txt
file2.txt
file3.txt
...
awk ... /directory/folder/example/file*.txt > out.txt
?