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
You have missed echo here. The line
i=`$f | tr -dc '[0-9]'`
should be
i=`echo $f | tr -dc '[0-9]'`