I want to change all filenames they have the exact length of 16 characters (digits and lower case letters). I tried [0-9a-z]{16} and [0-9a-z]\{16\} for the placeholder regX in the following snippet, but it doesn't work.for file in <regX>do  mv $file ${file}.txtdone
Fetch all filenames with specific number of characters
regular expression;mv;for
With extglobshopt -s extglobfor file in +([0-9a-z])do    [[ ${#file} == 16 ]] && echo mv $file ${file}.txtdone+([0-9a-z]) means one or more of [0-9a-z] characters${#file} gives the length of filenameecho is for dry run, remove once things are fine