Page 1 of 1

Awk and gawk lowercase

Posted: 22 Nov 2012 10:27
by billrich

Code: Select all

echo %1 | awk {"print tolower($_)"}
echo %1 | gawk {"print tolower($_)"}


Output:
C:\test>awkgawk.bat ABC

C:\test>echo ABC | awk {"print tolower($_)"}
abc

C:\test>echo ABC | gawk {"print tolower($_)"}
abc


C:\test>echo abc | awk {"print toupper($_)"}
ABC

C:\test>echo abc | gawk {"print toupper($_)"}
ABC

Awk is one of the super efficient commands invented by ATT in the 1960s.
All these super efficient commands are available for windows.
Awk and gawk toupper and tolower case is more efficient and easier to use than most other case commands

Re: Awk and gawk lowercase

Posted: 22 Nov 2012 10:32
by foxidrive
Why don't you explain what you are doing in a paragraph, and say why it is a good idea.

Re: Awk and gawk lowercase

Posted: 22 Nov 2012 11:01
by Squashman
And as usual you don't explain that these commands are not native to Windows.

Re: Awk and gawk lowercase

Posted: 22 Nov 2012 16:07
by foxidrive
Awk and gawk can do so much more too. They have their own scripting language which is very powerful.

Re: Awk and gawk lowercase

Posted: 22 Nov 2012 16:30
by Squashman
foxidrive wrote:Awk and gawk can do so much more too. They have their own scripting language which is very powerful.

Can't argue that. I learned scripting on Linux long before I started with batch. I am sure there is a few different ways to do upper and lower case with diffeent NIX based utilities. Pretty sure TR and SED could probably do it as well.