-
Notifications
You must be signed in to change notification settings - Fork 1.8k
SC2101
Joachim Ansorg edited this page Nov 12, 2021
·
6 revisions
gzip file[:digit:]*.txt
gzip file[[:digit:]]*.txt
Predefined character groups are supposed to be used inside character ranges. [:digit:]
matches one of "digt:" just like [abc]
matches one of "abc". [[:digit:]]
matches a digit.
When passing an argument to tr
which parses these by itself without relying on globbing, you should quote it instead, e.g. tr -d '[:digit:]'