I have a directory with the following files:
foo.bar.1.txt
foo.bar.2.txt
foo.bar.1.out
foo.bar.2.out
bar.1.txt
bar.2.txt
bar.1.out
bar.2.out
I have two goals:
Primary: In a script, I'd like to cat bar.2.out (but not foo.bar.2.out) but the "bar" varies from case to case. In other words, I really want it to cat *.2.out, excluding the foo.bar.2.out file.
Secondary: Learn more about how extended globbing works. I understand that I could probably use some combination of find and grep to filter for the file I want.