I\'m writing a small bash script to get the number out of each file name. For example the file name helloworld1.txt would produce 1.
helloworld1.txt
1
When attem
The line in the loop without a subshell, pipe and additional process per file:
i=${f//[^0-9]/}
The parameter substitution removes all non-digits.