I am trying to collect lines from a file with specific word:
for example the word host, I need to direct all names of hosts.

host= mx,rt,fd,rt,wed,asd, \
 fm, jklf,dfd,dfd
host = jd,er,ew,yu,tg,ed,ik,cs,\
 fd, gr, jy
host = mz,fg,jh


I am using : grep -i host filename | awk '{print $2}'
only works for the first line , it does not any name after \

so the output is;
 mx,rt,fd,rt,wed,asd, \
 
 jd,er,ew,yu,tg,ed,ik,cs,\
 
 mz,fg,jh

as you see I am not getting rest of the line after \

I don't want to get rid of \ I would like to keep it, I can move it and connect all names so it will be seen as oneline , but I don't want to do that.


Any idea , it is appreciated, it could be easy , but I can make it work, even when I use tr.