Your options and arguments are in the wrong order in:
tr "a" -d
Standard command line syntax is that options are provided before all non-option arguments, like this:
tr -d a
Under this syntax, the first non-option argument (or the explicit argument --
) terminates option processing, and everything else after that on the command line is an argument.
A few commands like gcc
traditionally break this convention and mix options with arguments. In this case, it is usually because the ordering of options and arguments is significant (typically, options apply only to the arguments that follow them but not to the arguments that precede them).
Also, some commands relax the rule and allow options to be mingled with arguments in every case, but this is non-standard and should not generally be used, especially if you want code to be as compatible/portable as possible.