Im trying to make a script that will go into a directory and run my own application with each file matching a regular expression, specifically "Test[0-9]*.txt".
My input filenames look like this "TestXX.txt". Now, I could just use cut and chop off the Test and .txt, but how would I do this if XX wasn't predefined to be 2 numbers? What would I do if i had "Test1.txt" ... "Test10.txt"? In other words, How would I get the [0-9]* part?
Just so you know, I want to be able to make a OutputXX.txt :)
EDIT:
I have files with filename "Test[0-9]*.txt" and I want to manipulate the string into "Output[0-9]*.txt"