[ale] simple awk tolower question

Geoffrey esoteric at 3times25.net
Mon Mar 28 15:51:36 EST 2005


Christopher Bergeron wrote:
> 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

$1 is being interpreted by the shell, you need single quotes enclosing 
your {}

-- 
Until later, Geoffrey



More information about the Ale mailing list