Re: How to use the UNIX command: tr

From: Tonij (tonij67_at_hotmail.com)
Date: 08/06/04


Date: 6 Aug 2004 12:10:20 -0700


>
> That was my post, I didn't misunderstand anything.
>
> I know very well they are POSIX compliant keywords.
> My post should have been very clear that UCB tr ignores
> that and instead using the 2 parameters as translate patterns.
>
> I guess I just have to spell things out because a few
> posters seemed to have missed the point.

Here is the OPs question:

"Does anyone know how to convert a lower case string to upper case
string on the
Solaris 9, version April 2004 for Intel? Or, how to fix the problem
I'm
having. Apparently, the above UNIX command doesn't work anymore on
this new
Solaris version. Thanks."

Regardless of ones knowledge of POSIX compliance and what not, I think
we can all agree that this is a simple case of seeing different
behaviour between two commands with the same name. One of them
converts the word upper to lower, one of them converts the case
itself.

Is it too much to ask to just say it in so many words?

One of the first responses:

"Make sure you are not using "/usr/ucb/tr". Check your path."

( which nailed it on the head. Thread could have stopped here, OPs
question has been answered)

Then we see this response:

"I think for a UCB tar, it is working fine:

xxx> echo "lower" | /usr/ucb/tr '[:lower:]' '[:upper:]'
upper"

Which ignores the OPs question, even though the poster is obviously
aware that there are two different versions of tr being discussed.

It's these kind of responses, that state *just* enough information to
be techinically accurate but don't address the original question that
doesnt serve any purpose other than to inflate threads like this into
a big post-fest about the history of Unix when all the OP wanted to
know was:

"Does anyone know how to convert a lower case string to upper case
string"

Talk about going around the block to cross the street...



Relevant Pages

  • Re: How to use the UNIX command: tr
    ... > "Does anyone know how to convert a lower case string to upper case ... > Which ignores the OPs question, even though the poster is obviously ... I'm sorry, that is my response, taken out of context. ...
    (comp.unix.solaris)
  • Re: Sor 4 and 6
    ... as if they were a string of beads. ... even though they are in the upper part.. ... There is a recording of Ypes ...
    (rec.music.classical.guitar)
  • How to add a string to a big file in csharp !
    ... want to add a string to the file and the file is sort by letter! ... Just after "cabbage" and at the front ... string str = sr.ReadLine; ... long upper = fs.Length - 1; ...
    (microsoft.public.dotnet.general)
  • How to add a string to a big file in csharp !
    ... I want to add a string to the file and the file is sort by letter! ... string str = sr.ReadLine; ... long upper = fs.Length - 1; ... the FileStream is fitable in it? ...
    (microsoft.public.dotnet.languages.csharp)