[prev in list] [next in list] [prev in thread] [next in thread] 

List:       quanta
Subject:    Re: [Quanta] newbie - Remove blank lines
From:       Jens Herden <jens () kdewebdev ! org>
Date:       2007-10-03 10:04:17
Message-ID: 200710031204.22563.jens () kdewebdev ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Tuesday 02 October 2007, Alan Richmond wrote:
> On Tuesday 02 October 2007 09:35:19 am Jens Herden wrote:
> > > sed -i '/^$/d' yourFile.php
> >
> > Should this be:
> >
> > 	sed -e '/^$/d' yourFile.php
> >
> > ?
>
> No, -i tells sed to replace the old file with the editted one.  I even
> tested it before I posted and everything.  :)

Oh yes, you are right. I should not trust my memories but look into the man 
page first. :-(

But if you do it your way you have the problem that sed is reading from the 
file on the disk and writing to the disk again. If you want to use sed more 
efficiently with Quanta you better use is as a filter, reading from stdin and 
writing to stdout. This way Quanta can pipe the content of the current editor 
through it and would not work with the file on the disk.

> Checking --help for -e tells me it's for adding an external script to
> execution and takes a filename for an arg.

But this _is_ wrong ;-) If you want to give an external file you would use -f 
and -e is to give the expression as argument directly.

Jens


["signature.asc" (application/pgp-signature)]

_______________________________________________
Quanta mailing list
Quanta@mail.kde.org
https://mail.kde.org/mailman/listinfo/quanta


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic