bug-textutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug report: tr (textutils v.2.0.21)


From: Bob Proulx
Subject: Re: bug report: tr (textutils v.2.0.21)
Date: Sun Dec 1 13:48:01 2002
User-agent: Mutt/1.4i

Yakov Lerner (w) <address@hidden> [2002-12-01 13:01:53 +0200]:
> Here is testcase:
>     ... download and build textutils-2.0.21 (*1) ...
> 
>     echo xyzt | ./src/tr 'xyzt' '----'
>     ./src/tr: unrecognized option `----'
>     Try `./src/tr --help' for more information.
> 
>     echo xyzt | ./src/tr 'xy' '--'
>     ./src/tr: two strings must be given when translating
> 
> Apparently this tr mis-accepts SET2 for an option.

Yes.  GNU tr and similar programs accept options anywhere on the
command line.  This is different from POSIX and is therefore affected
by the setting of POSIXLY_CORRECT in the environment.  Here are two
suggested workarounds.

  echo xyzt | tr -- 'xyzt' '----'

  echo xyzt | POSIXLY_CORRECT=1 tr 'xyzt' '----'

Bob




reply via email to

[Prev in Thread] Current Thread [Next in Thread]