Date: Sun, 17 Sep 2017 19:37:22 +0200 From: Polytropon <freebsd@edvax.de> To: Ernie Luzar <luzar722@gmail.com> Cc: "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org> Subject: Re: case command Message-ID: <20170917193722.7d2ecbe3.freebsd@edvax.de> In-Reply-To: <59BE89E1.3050209@gmail.com> References: <59BE89E1.3050209@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170917193722.7d2ecbe3.freebsd>
