case command

Polytropon freebsd at edvax.de
Sun Sep 17 17:40:31 UTC 2017


On Sun, 17 Sep 2017 15:01:32 +0000, Manish Jain wrote:
> 
> 
> On 09/17/17 20:26, Steve O'Hara-Smith wrote:
> > On Sun, 17 Sep 2017 14:50:00 +0000
> > Manish Jain <bourne.identity at hotmail.com> wrote:
> > 
> >>
> >>
> >> On 09/17/17 20:12, Ernie Luzar wrote:
> >>> Looking for a system command that a I can pip a file through to change
> >>> all uppercase content to lower case.
> >>>
> >>> Is there such a command line command?
> >>
> >> cat <file> | tr '[:upper:]' '[:lower:]'
> > 
> > 	That poor overworked cat :)
> > 
> > tr '[:upper:]' '[:lower:]' < <file>
> > 
> 
> Being the proud owner of a beautiful cat, I rather feel inclined to pay 
> tribute to the family every now and then  : - )

The typical "useless use of cat" often is just an illustration
of how to use a certain command within a pipe chain. In cases
where no piping is needed, redirection can be used easily.

	% cat food.txt | grep "catfood" > mister_kitty.txt

Or:

	% grep "catfood" < food.txt > mister_kitty.txt

I hope the cat will understand now. =^_^=



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list