Click here for important information about

sed newline

November 7, 2010 at 03:36:37
Specs: Macintosh
Hi everyone,

I'd like to use the script validatehtml which returns either the given url is HTML strict or not, using

sh validatehtml

wget -q$1
cat check\?uri\=$1 | sed -n '/h2/ p' | sed 's/ */ /g' | sed 's/^ //g' | sed 's/\n//' | sed 's/\(<.*>\)*\(.*\)\(<.*>\)*/\2/g'

But he doesn't want to remove the newline. Can somebody help me? The sed procedures need to be in this order because the message proceeded by h2 is sometimes only 1 line, not two.

sh genscript :2 lines
sh genscript :1 line

thanks guys!

See More: sed newline

November 8, 2010 at 12:58:31
I am not exactly certain what you are trying to do. The only suggestion I have is instead of using this for a new-line:


replace it with this and see if it helps:


Otherwise, if you need more help, I suggest you post a sample data file and explain what you are trying to do.

Report •
Related Solutions

Ask Question