From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 03 19:40:18 2017 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 ) id 1eLeny-0008Cw-CK for submit@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 ) id 1eLawy-0007u9-BA for submit@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 ) id 1eLaws-0008GN-5X for submit@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 ) id 1eLaws-0008GH-20 for submit@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 ) id 1eLawq-0000RI-RC for bug-sed@gnu.org; Sun, 03 Dec 2017 15:33:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eLawn-0008FA-O5 for bug-sed@gnu.org; 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 ) id 1eLawn-0008Es-II for bug-sed@gnu.org; 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 ; 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 ; 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 To: bug-sed@gnu.org Message-Id: <1601e151207-171e-6d07@webjas-vac031.srv.aolmail.net> 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@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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@aol.com ------=_Part_34574_708192945.1512333185543 Content-Type: text/html; 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@aol.com
------=_Part_34574_708192945.1512333185543--