In BASH I thought to use sed, but can’t figure how to extract pattern instead usual replace.
For example:
FILENAME = ‘blah_blah_#######_blah.ext’
number of ciphers (in above example written with “#” substitute) could be either 7 or 10
I want to extract only the number
If all you need is to remove anything but digits, you could use
to get all digits grouped per filename (123test456.ext will become 123456), or
for all groups of numbers (123test456.ext will turn up 123 and 456)