case command
Polytropon
freebsd at edvax.de
Sun Sep 17 17:38:05 UTC 2017
On Sun, 17 Sep 2017 10:42:41 -0400, 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?
Several ones. One is to use tr:
... | tr '[A-Z]' '[a-z]' | ...
Or with character classes:
... | tr '[:upper:]' '[:lower:] | ...
You can also use awk for this task:
... | awk '{ print tolower($0) }' | ...
You can use this within the awk portion of your script, too.
Or shortened:
... | awk '{ print tolower }' | ...
But keep in mind: Things like german Umlauts usually won't
be processed correctly.
Those are a few possible solutions. There are more. ;-)
--
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
More information about the freebsd-questions
mailing list