[plug] A question about using sed

Arie Hol arie99 at ozemail.com.au
Fri Apr 25 17:55:12 WST 2008



On 25 Apr 2008 at 17:22, Craig Dyke wrote:

> Hi Arie
> 
> I would have used this:
> 
> sed -ie '/^\s*/d' *.html
> 
> Tested this and it seems to work okay
> 
> Craig
> 

Thanks for your reply :

The command you gave : 

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

Did not work either - but after a closer examination of the output files -
I have noticed that most of the blank lines left in the html files 
contain only a single line feed character without the usual return feed.

Some blank lines contain a single space plus a linefeed character.

And some blank lines contain a single tab plus a linefeed character.

So I now need a sed command that will remove only the blank lines that 
contain only -
(a single linefeed character | a single space | a single tab)
 - without removing the linefeed character from all other lines in the 
file ?????????????


Regards Arie
------------------------------------------------------------------
 For the concert of life, nobody has a program.
------------------------------------------------------------------



More information about the plug mailing list