how can i search the first column of a file and get the corresponding value from second column using variable as search criteria?
I need something like this...
for pdf in $reports
do
id=` less /path/file | awk '$1 == pdf {print $2}'`
do other stuff
done