Documentation for the rust cdx package.
The cdx application is something like the gnu textutils, with added benefits :
Tools
- cat Concatenate files.
- calc Solve arithmetic equations.
- binsearch Search in sorted files.
- cgrep Select lines from a file, based on matching column values.
- cut Select combine and rearrange parts of each line.
- join Join files on a matching column.
- paste Join columns from multipl files.
- sample Display some of the lines of a file.
- sort Sort the lines of a set of input files.
- tabs Display a text file, truncated to fit the screen and with columns aligned.
- tooltest Test command line tools.
- transpose Transpose the lines of a file.
- uniq Select only one of any set of adjacent lines.
- verify Verify that file contents are correct.
- wc Count words, lines and bytes of files.
The SQL query
SELECT table1.title,table2.author from tabel1 JOIN table2 ON table1.id == table2.id WHERE tabel1.mode == "avail"
can be translated as
cdx cgrep -p, mode,,avail table1.txt | cdx join -k id - table2.txt -o 1.title,2.author
or
cdx join -k id table1.txt table2.txt -o 1.title,2.author | cdx cgrep -p, mode,,avail