On 01/15/08 21:24, Clint Adams wrote:
> On Tue, Jan 15, 2008 at 01:12:21AM -0800, Kingsley G. Morse Jr. wrote:
> > FYI: I happened to notice that editing in place
> > with sed's "-i" option also removes symlinks and
> > creates new, duplciate files.
> 
> perl -i does the exact same thing. What makes you think this is a bug?

Hi Clint,

That's interesting that "perl -i" behaves the same
way.

Here's why it seems to me that this is a bug.

    1.) symbolic links are lost,

    2.) duplicate files are created and

    3.) only one copy of each file is edited.

For example, I used sed's "-i" option to edit
symbolically linked files in /etc/rc*/*.  As you
know, these directories contain scripts that
launch daemons at boot time. 

Two tangible consequences that I encountered are

    a.) multiple copies of at least one daemon
    were launched, which corrupted a log file with
    duplicate data and

    b.) "apt-get install" failed to upgrade the
    libc6 package with an error message about not
    finding the symbolic link.

I'm confident that sed's behavior could cause
many other problems.

Thanks,
Kingsley




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to