textql
Execute SQL against structured text like CSV or TSV files. More information: https://github.com/dinedal/textql#usage.
- Print the lines in the specified CSV file that match an SQL query to
stdout:
textql -sql ""
- Query a TSV file:
textql -dlm=tab -sql ""
- Query file with header row:
textql -dlm= -header -sql ""
- Read data from
stdin:
cat | textql -sql ""
- Join two files on a specified common column:
textql -header -sql "SELECT * FROM JOIN ON . = . LIMIT " -output-header
- Format output using an output delimiter with an output header line:
textql -output-dlm= -output-header -sql "SELECT AS FROM "
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
