GNU bug report logs -
#29556
Question About sed for Windows
Previous Next
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[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 7 years and 194 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.