I am wanting to take a list of strings and loop through a list of textfiles to find matches. Preferably with awk and parsing the search strings into an array.
// Search_strings.txt
tag
string
dummy
stuff
things
// List of files to search in
textfile1.txt
textfile2.txt
Tried to pass the search_string.txt into an array. Count the rows in the array and loop with the FOR syntax through each file. But I get messed up with the code.
Unfortunately windows CMD does not expand * at all. Any glob-like expansion is done inside programs, not CMD, meaning it's an entirely optional feature which most commands don't support, and those which do often don't do it the same way as others.
---------- Post updated at 03:11 PM ---------- Previous update was at 03:07 PM ----------
Also, all your datafiles are going to be full of garbage carriage returns.
---------- Post updated at 03:16 PM ---------- Previous update was at 03:11 PM ----------
CMD doesn't have real quoting, either. Strings and arguments and quotes all get passed as-is. Yes, all quoting in CMD is an optional feature. :wall: Try and avoid spaces in filenames.