Crab: Filesystem SQL for Mac and Windows

Query and process files, like data in a database


FROM

  ls | awk -F . '{print $NF}' | sort | uniq -c | awk '{print $2,$1}'

TO

SELECT extension, count(*) FROM files GROUP BY extension;

Crab is a command line tool for analyzing and processing files with SQL.
It's for Bash and PowerShell users who need a tool for grouping and filtering file data.
And it's for SQL users who don't want to learn a domain specific language just to process files

Move the shell sideways

  • SQL's set based logic: Ideal for selecting groups of files for processing, for comparing one set of files with another, and for analyzing file stats

  • Use the LIKE operator: Find files with simple text pattern matching. No corner cases due to spaces in filenames, shell special characters, overlong path names, argument list too long errors, ...

  • Run Operating System commands on files listed in query results. No need to pipe anything, it's a SQL function. Use ORDER BY to specify the order files are processed.

  • Use SQL in Bash scripts, or run SQL scripts to process files

  • Write query results to file or pipe output to other commands

  • Combine search criteria using AND, OR and NOT.

  • No new language to learn or support, it's SQL

  • No need to install, no need for admin rights, just unzip and run

Pop: Cross-project code search for Mac

Code search deserves a dedicated tool

Faster_code_search  +  better_workflow  ⇒  code_faster

Simple_install  zero_learning_curve  low_cost  free_trial  ⇒  worth_a_shot

We're a UK based startup building the developer tools we always wanted. Read more about us, or check out our data privacy policy


We use Google and Clicky Analytics to count how many people visit, and how many come back.
For now, if you don't want a cookie, please browse in incognito mode.

© 2019 Etia UK