awk

here I am again :slight_smile:

i ran this awk command :

awk -F ';' '/mummy/{print $1}' movielist

and I got the desired result (the mummy) from the file (movielist)

I also ran

awk -F ';' "/$titlesearch/{print $1}" movielist # $titlesearch=mummy

but this prints out the whole line, NOT just the first entry (the mummy) which I am looking for

also tried

awk -F ';' '/$titlesearch/{print $1}" movielist

but this does not return anything.

Where am I setting the quotations wrong ?

thanks,
Steffen

awk -F ';'  '/'$titlesearch'/{print $1}' movielist

you guys are awesome, thanks a lot :cool:

Steffen