Yakov Lerner (w) <[EMAIL PROTECTED]> [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


_______________________________________________
Bug-textutils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-textutils

Reply via email to