What | Sqawk |
Where | https://github.com/dbohdan/sqawk |
Description | An Awk-like program that uses SQL and can process multiple files at once. It is powered by SQLite. |
Platforms | Linux, Windows XP/7/8.x, OS X, FreeBSD. |
Prerequisites | Tcl 8.5 or newer, Tcllib, SQLite3 bindings for Tcl. |
Updated | 01/2015 |
License | MIT |
find . -iname '*.jpg' -type f -printf '%s\n' | sqawk 'select sum(a1)/1024/1024 from a'
sqawk -1 'select a1 from a order by random()' < file
Print them and how many times they are repeated.
sqawk -1 -OFS ' -- ' 'select a0, count(*) from a group by a0 having count(*) > 1' < file
13 -- 2 16 -- 3 83 -- 2 100 -- 2