Writting a script I wanted to replace all characters except alpha ([a-zA-Z]) with a line break. By definition, when using -c flag (set complement) tr is supposed to replace all characters that are not in the SET1 with the character specified in SET2. Nevertheless, it doesn't work as expected... Try this:
echo '[[:lower:]]' | tr -c '[a-zA-Z]' '\n'
Output I get:
[[ lower ]]
As it can be seen it replaces columns but not square brackets, which it it is supposed to replace.
Can anyone clarify this?