Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 May 2002 13:22:11 +0100
From:      j mckitrick <jcm@FreeBSD-uk.eu.org>
To:        Benoit Lacherez <blacherez@ac-bordeaux.fr>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Why does 'sed' delete my input file?
Message-ID:  <20020531132211.A29199@dogma.freebsd-uk.eu.org>
In-Reply-To: <20020531141421.A72043@bisclavret.iris33.ac-bordeaux.f>; from blacherez@ac-bordeaux.fr on Fri, May 31, 2002 at 02:14:21PM %2B0200
References:  <20020531130029.B28925@dogma.freebsd-uk.eu.org> <20020531141421.A72043@bisclavret.iris33.ac-bordeaux.f>

next in thread | previous in thread | raw e-mail | index | archive | help

Wow!  Lots of fast responses.  This is what makes BSD great.  Thanks, all.

On Fri, May 31, 2002 at 02:14:21PM +0200, Benoit Lacherez wrote:
| The solution is to read the file first, then to write in it :
| 
| cat file1 | sed 's/foo/bar/g' > file1

Perfect!


jm
-- 
There are only 10 types of people in this world:
those who understand binary, and those who don't.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020531132211.A29199>