On Mon, Aug 16, 2010 at 6:51 AM, Brian Foster <blf at utvinternet.ie> wrote:
> | Date: Sun, 15 Aug 2010 19:48:07 +0100
> | From: Conor Mac Aoidh <conormacaoidh at gmail.com>
> |
> | On Sun, Aug 15, 2010 at 7:34 PM, Brian Foster <blf at utvinternet.ie>
> wrote:
> | > | From: Conor Mac Aoidh <conormacaoidh at gmail.com>
> | > |[ ... ]
> | > | sed expects anything after the -i to be the extention given to all
> the
> | > | backup files it makes.
> | >
> | > No, it does not. The suffix is _optional_ [ on Linux ...].
> |
> | Well I can assure you that it does make a backup on OS X... for example
> this
> | command:
> |
> | sed -i -e '/*/d' index.php
> |
> | will remove comments from index.php, and create a backup file called
> | index.php-e
>> That's entirely possible.
>> It does not, and as far as I know never has,
> worked that why on Linux. I can see someone
> thinking that behaviour would be useful, so
> I'm not totally surprised the varient exists.
>
Looking at the manpages, it seems to work that way in both BSD/OSX[0] and
Linux[1] variants...
[0]
http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man1/sed.1.html
[1] http://www.gnu.org/software/sed/manual/sed.html#Invoking-sed
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!