[BusyBox] tr argumnent processing

Craig Skinner craig at openpost.org
Tue Jul 26 11:48:31 MDT 2005


Rainer Weikusat wrote:
> The busybox tr understands exactly one argument with support for
> switch clustering, it does not understand the conventional '--' for
> "stop with option processing" and using a single hyphen instead of an
> actual option does neither result in an error message nor is the
> obvious use (instead of '--' to terminate option processing)
> documented. The patch below changes tr.c to accept multiple arguments,
> to print a usage message whenever an undocumented or incomplete option
> is encountered and to accept '--' for its "usual"
> purpose. Additionally, it does away with the pointless Pascalisms in
> the argument processing (one variable less), prints a usage message
> when called with no arguments and corrects the verb in one of the
> error messages.

Well done, I'm keen on tr for jobs that sed would be overkill for.


More information about the busybox mailing list