[ale] simple awk tolower question

Christopher Bergeron christopher at bergeron.com
Mon Mar 28 14:26:22 EST 2005


Can anyone help me with this one?  It's an apparently simple awk 
statement, however, I'm not getting the expected result.

I have a text file that has a name in it (/tmp/new_users.txt).

$ cat /tmp/new_users.txt
Smith

I'm trying to convert it to lower case.  Easy enough right?  Here's what 
I'm trying:

$ awk "{ print tolower($1) }" /tmp/new_users.txt
awk: cmd. line:1: fatal: 0 is invalid as number of arguments for tolower


The file may contain multiple lines, so I'd like to convert all the 
lines to all lowercase.  I won't have any funny characters, just 
alphanumeric.

Any ideas?

Thanks in advance to they whom help me.
-CB



More information about the Ale mailing list