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

Previous Next

Package: sed;

Reported by: Ronald Satz <transpower <at> aol.com>

Date: Mon, 4 Dec 2017 00:41:03 UTC

Severity: normal

To reply to this bug, email your comments to 29556 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-sed <at> gnu.org:
bug#29556; Package sed. (Mon, 04 Dec 2017 00:41:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ronald Satz <transpower <at> aol.com>:
New bug report received and forwarded. Copy sent to bug-sed <at> gnu.org. (Mon, 04 Dec 2017 00:41:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ronald Satz <transpower <at> aol.com>
To: bug-sed <at> gnu.org
Subject: Question About sed for Windows
Date: Sun, 3 Dec 2017 15:33:07 -0500
[Message part 1 (text/plain, inline)]
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 <at> aol.com
[Message part 2 (text/html, inline)]

This bug report was last modified 6 years and 139 days ago.

Previous Next


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