To ignore user input case.

hi, i will like to know whether awk command can ignore case?
i written a script that will take in user input and search for data on the 1st field from a text file.

echo -n "Title:"
       read title
       awk -F":" '$1~/'"$title"'/{print $0}' Filename
       read ans 
           return

Everything works fine, but the script cannot ignore case of the user input and therefore it can't retrieve the data correctly.
Any solutions on it?
Thank You.

Hi.

Awk has to toupper and tolower function that you could use:

$ typeset -l X
$ X=Blah
$ echo $X
blah
$ echo $X | awk '{ print toupper($1) }'
BLAH

So...

toupper($1) ~ toupper("'$title'")

Or only with awk:

awk -F":" 'BEGIN {
  printf "Enter the title: "
  getline input < "-"
  title=toupper(input)
}
toupper($1) ~ title
' Filename

How about grep?

echo -n "Title:"
       read title
       grep -i "$title[^:]*" Filename
       read ans

nice to see input in awk.

Thank for the solutions ^^