minor tr(1) gotcha I encountered recently: It does NOT use regex-style "[a-z]" notation for a character class. One might do something like
$ echo 'abcd123' | tr -d '[a-c]'
d123
which does what's expected. But then put a "[" or "]" in the input:
$ echo '[abcd123]' | tr -d '[a-c]'
d123
The "[" and "]" are treated as literal characters and get deleted/translated too. You can use class-names with them though:
$ echo '[abcd123]' | tr -d '[:alpha:]'
[123]