I never can remember this:
will remove the trailing ".txt". Mnemonic: % sorta looks like dividing two circles. "%.*" says to divide at the period, matching any file type.
I often use a for loop which looks something like:
for f in foo*.txt ; do
Keyword fodder: bash, shell script, remove file type, remove file extension, basename, base name, Linux, Unix