I want to do something like take the part of a wildcard match and use it similarly to a regex match. The command might look something like this
cat foo_* | python magic.py > magic_*
If my file names are
I want the output to be in files named
effectively changing the file names from
Is it possible to do this in a shell command? I'm using
bash, but an answer for other shells is fine too.