# [EMAIL PROTECTED] / 2002-12-02 14:20:44 +0100:
> Today Conrad Sabatier wrote:
> > Recent versions of FreeBSD now have a version of 'sed' that can do these
> > types of replacements "in place", i.e., without the need for a temporary
> > file:
> 
> > sed -i -e 's/^touch /rm /' infile
> 
> No. I'm pretty sure, there is a temporary file somewhere. You can't
> edit a file `in place' really, w/o a need temporary files (or ev.
> memory mapping the file). With the `-i' flag sed does this for you,
> ie. no need that you create a temporary file.

    wow, even the man page is not this anal. :)

    point in case: there's no tmp file from the user's perspective, and
    Conrad Sabatier's description is in line with the man page text:

    -i extension
        Edit files in-place, saving backups with the specified extension.
        If a zero-length extension is given, no backup will be saved.  It
        is not recommended to give a zero-length extension when in-place
        editing files, as you risk corruption or partial content in situ­
        ations where disk space is exhausted, etc.

-- 
If you cc me or remove the list(s) completely I'll most likely ignore
your message.    see http://www.eyrie.org./~eagle/faqs/questions.html

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to