Hi puneetkanchi
the code shared by palanisvr is perfect
...there is a small fix in it when you paste it in your window...."there should be no space between -F and ' operator"
try to paste the below rectified code and share the response....
Code:
cat test.txt |awk -F'>' '{print $2}' | awk -F'<' '{ if ( $2 == "" ) print "0";else print $1 }'
---------- Post updated at 05:10 PM ---------- Previous update was at 05:08 PM ----------
Hi puneetkanchi
the code shared by palanisvr is perfect ...there is a small fix in it when you paste it in your window...."there should be no space between -F and ' operator"
try to paste the below rectified code and share the response....
Code:
cat test.txt |awk -F'>' '{print $2}' | awk -F'<' '{ if ( $2 == "" ) print "0";else print $1 }'