bash - Ubuntu awk - Print filenames that contain anything other than digits -
i wish print filenames not "contain numbers":
this code far:
find . -type f | awk '!/[[:digit:]]/ {print}' this finds me every file not containing digit.
my problem that, checks directories names too.
newest code:
find . -type f | awk '/.*\w.*/ {print}' i think works, checks directories name, care files
if understand correctly:
to print filenames not "contain numbers":
find . -type f -printf '%f\n'| awk '/[^[:digit:]]/ {print}' no directories included.
if want filenames not "contain numbers or letters":
find . -type f -printf '%f\n'| awk '/[^[:alnum:]]/ {print}' but believe wise include dot . , space .
characters used in filenames:
find . -type f -printf '%f\n'| awk '/[^[:alnum:]. ]/ {print}' the (negated) shorthand character class \w include _ underscore, , less portable (is gnu extension).
i not know if mean include or not.
Comments
Post a Comment