X-Loop: help-debbugs@HIDDEN Subject: bug#29556: Question About sed for Windows Resent-From: Ronald Satz <transpower@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-sed@HIDDEN Resent-Date: Mon, 04 Dec 2017 00:41:03 +0000 Resent-Message-ID: <handler.29556.B.151234801831558 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 29556 X-GNU-PR-Package: sed X-GNU-PR-Keywords: To: 29556 <at> debbugs.gnu.org X-Debbugs-Original-To: bug-sed@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.151234801831558 (code B ref -1); Mon, 04 Dec 2017 00:41:03 +0000 Received: (at submit) by debbugs.gnu.org; 4 Dec 2017 00:40:18 +0000 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> Message-Id: <1601e151207-171e-6d07@HIDDEN> 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-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: 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: <div><br> </div> <div>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<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 </div> <div><br> </div> <div> sed -silent s/,/\r\n/g peconind.txt</div> <div><br> </div> <div>where the txt file includes the comma separated data given above. 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. 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.</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--
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Ronald Satz <transpower@HIDDEN> Subject: bug#29556: Acknowledgement (Question About sed for Windows) Message-ID: <handler.29556.B.151234801831558.ack <at> debbugs.gnu.org> References: <1601e151207-171e-6d07@HIDDEN> X-Gnu-PR-Message: ack 29556 X-Gnu-PR-Package: sed Reply-To: 29556 <at> debbugs.gnu.org Date: Mon, 04 Dec 2017 00:41:03 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-sed@HIDDEN If you wish to submit further information on this problem, please send it to 29556 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 29556: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D29556 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.