st
st copied to clipboard
added comma|c option allowing the ability to specify a delimiter for inp...
Basically you can specify --comma ',' and use commas as delimiters. I also switched the process loop to call an interator, which either splits lines of an input delimiter is set, or returns the line as a whole. I think this option would be a better use for delimiter, but as that's already set, I called it comma.
sure, with values like 1,2,3,4,5
but mine strips whitespace as well. so if csv.txt looks like 1, 2, 3, 4, 5
your's will warn about invalid values, where mine with will have stripped correctly.
I think you can probably use awk to achieve the columns you want, but you are getting away from a simple shell script.
anyway, I found a few bugs in my implementation, so I'm going to submit another pull request.