[plug] A question about using sed

Craig Dyke grail69 at amnet.net.au
Fri Apr 25 17:22:04 WST 2008


Hi Arie

I would have used this:

sed -ie '/^\s*/d' *.html

Tested this and it seems to work okay

Craig


Arie Hol wrote:
> I am trying to clean up a batch of html files using a series of sed 
> commands.
>
> Most of the commands I have used have been successful, but I find that 
> they are leaving a lot of blank lines in the html files.
>
> I have tried using the following command to remove the blank lines :
>
> 	sed -ie "s/^\s*$//i" *.html
>
> But the blank lines persist - and sed does not return any errors.
>
> What am I doing wrong ?
>
> Or have I missed something ?
>
> TIA
>
> Regards Arie
> ------------------------------------------------------------------
>  For the concert of life, nobody has a program.
> ------------------------------------------------------------------
> _______________________________________________
> PLUG discussion list: plug at plug.org.au
> http://www.plug.org.au/mailman/listinfo/plug
> Committee e-mail: committee at plug.linux.org.au
>
>
>   




More information about the plug mailing list