awk help

Hi All,

have a file with list of server information, using awk just generating command

need to print second command in next line

---------------------------------------------------------------------

cat test.txt
mack
jack
cat test.txt | awk -v hst=$(hostname) ' { if ($1 == "jack" && hst = "varprod09" ) print "true" "yes" } '

---------------------------------
output

trueyes

-----------
desired output

true
yes

Lose the pipe if you have an input file

awk -v hst=$(hostname) ' { if ($1 == "jack" && hst = "varprod09" ) 
     {print "true" 
       print "yes" } '  test.txt

You can also either of these two print statements:

printf("%s\n%s\n","true, "yes")
print "true" "\n" "yes"

Note the a space acts to concatenate strings -
"foo" "foo2" -> foofoo2

also:
hst = "varprod09"
should be:
hst == "varprod09"