Let's say I have n
files with names like link123.txt
, link345.txt
, link645.txt
, etc.
I'd like to grep a subset of these n
files for a keyword. For example:
grep 'searchtext' link123.txt link 345.txt ...
I'd like to do something like
grep 'searchtext' link[123\|345].txt
How can I mention the filenames as regex in this case?