GNU bug report logs - #29556
Question About sed for Windows

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: sed; Reported by: Ronald Satz <transpower@HIDDEN>; dated Mon, 4 Dec 2017 00:41:03 UTC; Maintainer for sed is bug-sed@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 4 Dec 2017 00:40:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 03 19:40:18 2017
Received: from localhost ([127.0.0.1]:44015 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eLeny-0008Cw-CK
	for submit <at> debbugs.gnu.org; Sun, 03 Dec 2017 19:40:18 -0500
Received: from eggs.gnu.org ([208.118.235.92]:44458)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <transpower@HIDDEN>) id 1eLawy-0007u9-BA
 for submit <at> debbugs.gnu.org; Sun, 03 Dec 2017 15:33:20 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <transpower@HIDDEN>) id 1eLaws-0008GN-5X
 for submit <at> debbugs.gnu.org; Sun, 03 Dec 2017 15:33:15 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:45404)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <transpower@HIDDEN>) id 1eLaws-0008GH-20
 for submit <at> debbugs.gnu.org; Sun, 03 Dec 2017 15:33:14 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:35420)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <transpower@HIDDEN>) id 1eLawq-0000RI-RC
 for bug-sed@HIDDEN; Sun, 03 Dec 2017 15:33:13 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <transpower@HIDDEN>) id 1eLawn-0008FA-O5
 for bug-sed@HIDDEN; Sun, 03 Dec 2017 15:33:12 -0500
Received: from omr-m011e.mx.aol.com ([204.29.186.11]:44806)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <transpower@HIDDEN>) id 1eLawn-0008Es-II
 for bug-sed@HIDDEN; Sun, 03 Dec 2017 15:33:09 -0500
Received: from mtaomg-mbd02.mx.aol.com (mtaomg-mbd02.mx.aol.com
 [172.26.252.16])
 by omr-m011e.mx.aol.com (Outbound Mail Relay) with ESMTP id 2A2413800091
 for <bug-sed@HIDDEN>; Sun,  3 Dec 2017 15:33:08 -0500 (EST)
Received: from core-aax02h.mail.aol.com (core-aax02.mail.aol.com [10.76.5.129])
 by mtaomg-mbd02.mx.aol.com (OMAG/Core Interface) with ESMTP id 9191F38000083
 for <bug-sed@HIDDEN>; Sun,  3 Dec 2017 15:33:07 -0500 (EST)
Received: from 72.94.234.160 by webjas-vac031.srv.aolmail.net (10.96.19.34)
 with HTTP (WebMailUI); Sun, 03 Dec 2017 15:33:05 -0500
Date: Sun, 3 Dec 2017 15:33:07 -0500
From: Ronald Satz <transpower@HIDDEN>
To: bug-sed@HIDDEN
Message-Id: <1601e151207-171e-6d07@HIDDEN>
Subject: Question About sed for Windows
MIME-Version: 1.0
Content-Type: multipart/alternative; 
 boundary="----=_Part_34574_708192945.1512333185543"
X-MB-Message-Source: WebUI
X-MB-Message-Type: User
X-Mailer: JAS STD
X-Originating-IP: [72.94.234.160]
x-aol-global-disposition: G
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mx.aol.com;
 s=20150623; t=1512333188;
 bh=aK+DHnoPBEQsSPiJTTG+BdKpmBQHWWxy7NZgys2B6f0=;
 h=From:To:Subject:Message-Id:Date:MIME-Version:Content-Type;
 b=VUyJO+usAF6h69KUkJ0eMWds/PCG62HFEJZumNaE+G0KzRKnEgUT1UxVsYkEHLAvN
 JwHEmWc2FUVuUJ7jnlWCCS1cL+/4iwPhb8/IeaY3ov3Mc23cqzsSfIphNhjNxRBB69
 wEf14pYUzlfLtFCHPianCxisNoijEjT0kq1MX/Z0=
x-aol-sid: 3039ac1afc105a245f8321d3
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
 [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Sun, 03 Dec 2017 19:40:17 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

------=_Part_34574_708192945.1512333185543
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

Sirs:  What I'd like to do is substitute a return and line space for each occurrence of a comma.  This would convert a csv file to a flat file.  For example, here is the data for a csv file:


23, 10, -59978, -8109,  -36994, -13901,  -3616, 14636, 10124,  -10157,  8966, 1343, -10838,  13941, 3285,  -129, 16081,  -479800,  -5062,  -4325, 9875, 7100, 45500, 12140, 161100



I'd like to transform this to a column of values:


23
10
-59978
-8109
.
.
.
161100


Using sed for Windows I tried the command 


   sed -silent s/,/\r\n/g peconind.txt


where the txt file includes the comma separated data given above.  The result of this command is


23?
10?
-59978?
-8109?
.
.
.
161100



where, oddly, the last number does not have a question mark, but all of the others do.  Perhaps I'm using the wrong syntax--if so, what is the correct syntax?  On the other hand, perhaps there is a bug in your implementation of sed.  Please let me.


Regards,
Ronald W. Satz, Ph.D.
Transpower Corporation
transpower@HIDDEN

------=_Part_34574_708192945.1512333185543
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit

<font color='black' size='2' face='arial'>Sirs: &nbsp;What I'd like to do is substitute a return and line space for each occurrence of a comma. &nbsp;This would convert a csv file to a flat file. &nbsp;For example, here is the data for a csv file:
<div><br>
</div>

<div>23, 10, -59978, -8109, &nbsp;-36994, -13901, &nbsp;-3616, 14636, 10124, &nbsp;-10157, &nbsp;8966, 1343, -10838, &nbsp;13941, 3285, &nbsp;-129, 16081, &nbsp;-479800, &nbsp;-5062, &nbsp;-4325, 9875, 7100, 45500, 12140, 161100<br>
</div>

<div><br>
</div>

<div>I'd like to transform this to a column of values:</div>

<div><br>
</div>

<div>23</div>

<div>10</div>

<div>-59978</div>

<div>-8109</div>

<div>.</div>

<div>.</div>

<div>.</div>

<div>161100</div>

<div><br>
</div>

<div>Using sed for Windows I tried the command&nbsp;</div>

<div><br>
</div>

<div>&nbsp; &nbsp;sed -silent s/,/\r\n/g peconind.txt</div>

<div><br>
</div>

<div>where the txt file includes the comma separated data given above. &nbsp;The result of this command is</div>

<div><br>
</div>

<div>23?</div>

<div>10?</div>

<div>-59978?</div>

<div>-8109?</div>

<div>.</div>

<div>.</div>

<div>.</div>

<div><span style="font-size: 10pt;">161100</span><br>
</div>

<div><span style="font-size: 10pt;"><br>
</span></div>

<div><span style="font-size: 10pt;">where, oddly, the last number does not have a question mark, but all of the others do. &nbsp;Perhaps I'm using the wrong syntax--if so, what is the correct syntax? &nbsp;On the other hand, perhaps there is a bug in your implementation of sed. &nbsp;Please let me.</span></div>

<div><span style="font-size: 10pt;"><br>
</span></div>

<div><span style="font-size: 10pt;">Regards,</span></div>

<div><span style="font-size: 10pt;">Ronald W. Satz, Ph.D.</span></div>

<div><span style="font-size: 10pt;">Transpower Corporation</span></div>

<div><span style="font-size: 10pt;">transpower@HIDDEN</span></div>
</font>
------=_Part_34574_708192945.1512333185543--




Acknowledgement sent to Ronald Satz <transpower@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-sed@HIDDEN. Full text available.
Report forwarded to bug-sed@HIDDEN:
bug#29556; Package sed. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.