bug-coreutils
[Top][All Lists]
Advanced

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

Re: tr command bug


From: Eric Blake
Subject: Re: tr command bug
Date: Tue, 22 Jan 2008 06:21:57 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Prateek Asthana on 1/21/2008 10:21 PM:
| [CHAR*]         in SET2, copies of CHAR until length of SET1
| [CHAR*REPEAT]   REPEAT copies of CHAR, REPEAT octal if starting with 0
|
| Accordingly I tried few things listed below. Please let me know if my
| usage of the command is wrong.

Thanks for the report; however this is not a bug.  All your examples used
a SET1 of length 1, so the length of SET2 did not have to be longer than
1; also SET2 is extended to the length of SET1 as though it implicitly
ended in *.  For an example where it matters:

$ echo test | tr tes '[a*]b'
aaba
$ echo test | tr tes '[a*1]b'
abba

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHle3184KuGfSFAYARAmFrAJ9VV1/BBiKo33Zio8UYgeGBPdY6yACfUIRG
DLgYzYlVKmSDihskG0oAnLQ=
=ElO/
-----END PGP SIGNATURE-----




reply via email to

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