I am doing some BASH shell scripting with curl. If my curl command returns any text, I know I have an error. This text returned by curl is usually in H
curl
Code for GNU sed:
sed '/ {:k s/<[^>]*>//g; / {N; bk}}' file
This might fail, you should better use a html-parsing tool.