Since you are using CentOS, most likely your tr command will be from the GNU coreutils package. GNU tr does not (yet) distinguish between the behavior of -c and -c . In recent versions of tr both the -c and -c options are equivalent short options for the --complement option.
According to GNU documentation for tr :
Tr currently only supports single-byte characters. In the end, it will support multi-byte characters; when this happens, the -C option will force it to complement the character set, while the -c option will complement it to the character set. This difference will only matter when some values are not characters, and this is only possible in locales that use multibyte encodings, when the input contains encoding errors.
I also found a quoted paragraph from the POSIX specification that will be vaguely worded, but Id agree with Ethan Reisner's interpretation that "implementations corresponding to the 1993 version of the specification will be violated, but earlier implementations (historical) and implementations corresponding to 2008 ( and newer) will work. "
In any case, GNU tr does not (yet) comply with this part of the 2008 POSIX specification (that is, by differentiating characters and values), so it cannot be used for testing.
By the way, you have a redundant 7 in your command tr -c -d "\000-\1777" .
source share