EOLtoCSV.sh is a Bourne shell script that converts values delimited by new line characters into comma separated values. The following before and after table shows what this script does. EOLtoCSV.sh accepts the list through stdin and outputs the result to stdout.
EOLtoCSV.sh is distributed as executable source code under the GNU General Public License. Please see the license agreement elsewhere on this site.
cat list.txt | EOLtoCSV.sh > newlist.txt
After a full year, while writing my new "EOL Converter.sh" script, I've realized that I uploaded a bad version of EOLtoCSV.sh above. I don't know how that happened. Why didn't anybody tell me? :-P The one that I attached below is the good version. Please download and use the one below, instead.
By the way, if you have any blank lines in the input, it will be converted to comma separated value (CSV) as well. This is not a bug, it's semantically correct, because you might have empty value fields. The following is an example.
If you don't want the blank lines to be converted, you can use the free StripBlankLines.class Java utility to convert it, before piping your data in this EOLtoCSV.sh script. You can download the StripBlankLines.class utility elsewhere on this site. The following command is an example of this situation:
cat list.txt | java StripBlankLines | EOLtoCSV.sh > newlist.txt
Did your message disappear? Read the Forums FAQ.
Spam Control | * indicates required field
TrackBack only accepted from WebSite-X Suite web sites. Do not submit TrackBacks from other sites.
No TrackBacks yet. TrackBack can be used to link this thread to your weblog, or link your weblog to this thread. In addition, TrackBack can be used as a form of remote commenting. Rather than posting the comment directly on this thread, you can posts it on your own weblog. Then have your weblog sends a TrackBack ping to the TrackBack URL, so that your post would show up here.
Messages, files, and images copyright by respective owners.
22 Users Online
Copyright © 1996 - 2018. All Rights Reserved.