trdsql icon indicating copy to clipboard operation
trdsql copied to clipboard

Support shell text utilities for string functions

Open amitbha opened this issue 4 years ago • 2 comments

The sqlite string functions are not powerful. How about provide a function to use shell utilities like grep, awk, sed etc.? ex. trdsql -ih -oh "select shell(grep -oP '[[:digit:]]{5}', c1) as num from d.csv"

amitbha avatar Jun 15 '20 04:06 amitbha

Thank you for your suggestion.

The sqlite string functions are not powerful.

I agree, the sqlite3 function may be inconvenient. However, I think it's hard to implement a shell call for every column. I thought shell call was possible instead of a table.

noborus avatar Jun 16 '20 23:06 noborus

U r right. I find some shell tools for manipulating csv data. Trdsql should focus on query csv. https://github.com/shenwei356/csvtk https://github.com/johnkerl/miller http://csvfix.byethost5.com/csvfix.htm

amitbha avatar Jun 17 '20 09:06 amitbha