<div dir="ltr">2013/9/4 Johnny Rosenberg <span dir="ltr"><<a href="mailto:gurus.knugum@gmail.com" target="_blank">gurus.knugum@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div class="h5">2013/8/9 Johnny Rosenberg <span dir="ltr"><<a href="mailto:gurus.knugum@gmail.com" target="_blank">gurus.knugum@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

2013/8/9 Tony Arnold <<a href="mailto:tony.arnold@manchester.ac.uk" target="_blank">tony.arnold@manchester.ac.uk</a>>:<br>
<div>> Johnny,<br>
><br>
> Just played with csvtool.<br>
><br>
> You could use it to replace the , field separators with TABs, say, pipe<br>
> through sort specifying TAB as the field delimiter and then pipe through<br>
> csvtool again to convert the fileds separators back to commas. E.g.:<br>
><br>
> csvtool -t ',' -u TAB cat input.csv | sort -f 2 -t '    ' | csvtool -t TAB<br>
> -u ',' cat - > output.csv<br>
><br>
> Not tried the above so it may need adjusting, but I think you should get<br>
> the idea.<br>
><br>
> Regards,<br>
> Tony.<br>
<br>
</div>Thanks! I'll take a closer look at that csvtool later. Looks promising<br>
so far, at least.<br>
<span><font color="#888888"><br>
<br>
Johnny Rosenberg<br>
</font></span></blockquote><div><br></div></div></div><div>Have been playing around with it now. It seems to work but there is one downside: It doesn't seem to support pipes…<br></div><div>SomeCommand | csvtool -t ',' -u TAB | sort…    # Not supported…?</div>

<div><br></div><div>Well, I don't need to use pipes, but it would be more convenient. Now I need to create at least one temp file, which isn't a big problem, but still… One can always wish for more…</div><span class=""><font color="#888888"><div>
<br>
</div><div><br></div><div>Johnny Rosenberg</div><div><br></div></font></span></div>
</blockquote><div><br></div><div>My bad. Some kind of a writing before thinking thing, I guess, sorry for that. I just didn't notice that you actually piped csvtool in your example…<br></div><div>So I'm going to experiment more with this right now. It seems like it actually does exactly what I want to do…</div>
<div><br></div><div><br></div><div>I was also searching for more information and found something called ”csvtools”. It seems to be some kind of collection of csv tools, such as converters to and from csv and tsv (csv2tsv and tsv2csv). It isn't available in the repositories, so I think I stick with csvtool for a while, at least.</div>
<div><br></div><div><a href="https://github.com/ceumicrodata/csvtools">https://github.com/ceumicrodata/csvtools</a></div><div><br></div><div><br></div><div><br></div><div>Johnny Rosenberg</div></div>