Hi people!,
I need extract from the file (test-file.txt) the values between
<context> and </context> tag's , the total are 7 lines,but i can only get 5 or 2 lines!!
Please look my code:
#awk '/context/{flag=1} /\/context/{flag=0} !/context/{ if (flag==1) p
rint $0; }' test-file.txt |wc -l
this return 5 lines
#awk '/context/{gsub(/<|>|\/|context/,"");print} ' test-file.txt|grep
. |wc -l
this return 2 lines that i can't get from the first try.
Best Regards,
-ric