CmdID

CmdID / Commands

q

Execute SQL-like queries on CSV and TSV files. tldr-pages

On several platforms

Opens CmdID with your command. It is read in your browser and sent nowhere.

Several platforms

from tldr-pages, CC BY 4.0

Query a CSV file by specifying the delimiter as ','

q --delimiter ',' "SELECT * from path/to/file"Identify

Query a TSV file

q --tab-delimited "SELECT * from path/to/file"Identify

Query file with header row

q --delimiter delimiter --skip-header "SELECT * from path/to/file"Identify

Read data from stdin; '-' in the query represents the data from stdin

output | q "select * from -"Identify

Join two files (aliased as f1 and f2 in the example) on column c1, a common column

q "SELECT * FROM path/to/file f1 JOIN path/to/other_file f2 ON (f1.c1 = f2.c1)"Identify

Format output using an output delimiter with an output header line (Note: Command will output column names based on the input file header or the column aliases overridden in the query)

q --output-delimiter delimiter --output-header "SELECT column as alias from path/to/file"Identify