st icon indicating copy to clipboard operation
st copied to clipboard

added comma|c option allowing the ability to specify a delimiter for inp...

Open gryftir opened this issue 11 years ago • 1 comments

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.

gryftir avatar Sep 11 '13 12:09 gryftir

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.

gryftir avatar Sep 12 '13 04:09 gryftir