I have lines in a file which look like the following
....... DisplayName=\"john\" ..........
where .... represents variable nu
....
This works for me:
awk -F "=" '/DisplayName/ {print $2}'
which returns "john". To remove the quotes for john use:
"john"
john
awk -F "=" '/DisplayName/ {gsub("\"","");print $2}'