Groups | Search | Server Info | Keyboard shortcuts | Login | Register


Groups > gnu.utils.bug > #2285

Re: Sed --in-place creates new file

Path csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail
From Bob Proulx <bob@proulx.com>
Newsgroups gnu.utils.bug
Subject Re: Sed --in-place creates new file
Date Mon, 6 Apr 2020 18:31:02 -0600
Lines 44
Approved bug-gnu-utils@gnu.org
Message-ID <mailman.293.1586219470.2644.bug-gnu-utils@gnu.org> (permalink)
References <CAMb0_rqGcbU74zHa1my0jC9q4mTzEDB=FQ=qYZRtukSL=xy=FA@mail.gmail.com> <20200406182049753957123@bob.proulx.com>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset=iso-8859-1
Content-Transfer-Encoding quoted-printable
X-Trace usenet.stanford.edu 1586219471 10386 209.51.188.17 (7 Apr 2020 00:31:11 GMT)
X-Complaints-To action@cs.stanford.edu
Cc bug-gnu-utils@gnu.org
To Jérémy Amiot <jeremy.amiot@gmail.com>
Envelope-to bug-gnu-utils@gnu.org
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=proulx.com; s=dkim2048; t=1586219463; bh=Rqn2SlUyRL5sbMpFf40ID3/qxEacBUabCu/1k2vbZZI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rZVZWIkiIl6k/32MYwQVVbzMR6cEDgYzcescjbELw14FID8CwwdmOzx9fa1RHyQZE 2tKN+O5xZ0+XhR4pCt1HfDhDWH0ajcD4n5nDbNG8TKdV+GGGxtX4dqO6VOmTjvxeTz nAL+dgJmeD2g7mXBPX8Ec7prT+0oJqfEJt9Wnp+oV4GDXpkqNTy7mDlymCgOMKM11W +9ysQOfYpKGqBA0K3MkmvlxOa5JaqFsoWlPsZhnRSFzhTAGjsuDaZsCwobz7FZu43K d4aUzdakp0ndPTSEDeQiGKZ80Y2pLrSMCuOc17qKc5oqLWxdhRYqLNbg0C0CUpWRfE lYLNTF2n+Seug==
Mail-Followup-To Jérémy Amiot <jeremy.amiot@gmail.com>, bug-gnu-utils@gnu.org
Content-Disposition inline
In-Reply-To <CAMb0_rqGcbU74zHa1my0jC9q4mTzEDB=FQ=qYZRtukSL=xy=FA@mail.gmail.com>
X-detected-operating-system by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy]
X-Received-From 96.88.95.61
X-BeenThere bug-gnu-utils@gnu.org
X-Mailman-Version 2.1.23
Precedence list
List-Id Bug reports for the GNU utilities <bug-gnu-utils.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-gnu-utils>, <mailto:bug-gnu-utils-request@gnu.org?subject=unsubscribe>
List-Archive <https://lists.gnu.org/archive/html/bug-gnu-utils>
List-Post <mailto:bug-gnu-utils@gnu.org>
List-Help <mailto:bug-gnu-utils-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-gnu-utils>, <mailto:bug-gnu-utils-request@gnu.org?subject=subscribe>
X-Mailman-Original-Message-ID <20200406182049753957123@bob.proulx.com>
X-Mailman-Original-References <CAMb0_rqGcbU74zHa1my0jC9q4mTzEDB=FQ=qYZRtukSL=xy=FA@mail.gmail.com>
Xref csiph.com gnu.utils.bug:2285

Show key headers only | View raw


Jérémy Amiot wrote:
> Using sed for windows version 4..2.1 (url :
> http://gnuwin32.sourceforge.net/packages/sed.htm)

Very often bugs in Windows versions of tools are due to the port to
Windows being the root cause.  Looking at that page it looks like the
last time the Windows port has been touched was 2010 which with it
being 2020 now seems like that project may have been abandoned.

You might try a different port to windows.  Either Cygwin or Mingw or
UnxUtils or MSYS or something.

> sed -i "s/to/ti/" test.txt will modify test.txt (ok) but will create a
> new file "sedGnChQb"
> sed -i"" "s/to/ti/" test.txt  does the same new file
> 
> How to avoid sed to create a new file ?

You have reached bug-gnu-utils which is a catch-all list for random
utilities.  But sed has it's own mailing list at bug-sed AT gnu.org.
If you want to reach the sed mailing list then that is the place.

I am not running Microsoft so can't test or try but this is not normal
behavior elsewhere.  I suspect without being able to check that it is
a problem with the port and does not exist in the upstream sed code.
I strongly suggest looking at one of the ports that has a version
better matched to your current system.  Because no current Windows
system today existed ten years ago when your current port was made.
Looking at the system requirements on the page you listed it looks
like all of those systems are now out of support.

Looking at your listed URL I see a reference to this to post bugs.

  http://gnuwin32.sourceforge.net/packages/sed.htm

That looks problematic because the archives links are no longer
available.  But the GnuWin bug reporting pages look to be current and
active.

  https://sourceforge.net/p/gnuwin32/bugs/

Good luck!
Bob

Back to gnu.utils.bug | Previous | Next | Find similar


Thread

Re: Sed --in-place creates new file Bob Proulx <bob@proulx.com> - 2020-04-06 18:31 -0600

csiph-web