LWN.net Logo

Special filenames

Special filenames

Posted Mar 24, 2009 15:26 UTC (Tue) by efexis (guest, #26355)
In reply to: Special filenames by epa
Parent article: Malcolm: SQL for the command line: "show"

Standard unixy shell methodology, 'show' reads from standard input, so becomes:

show host, "count(*)", "total(size)" < /var/log/httpd/access_log

or

cat /var/log/httpd/*access_log* | show host, "count(*)", "total(size)"

would solve that


(Log in to post comments)

Special filenames

Posted Mar 24, 2009 21:36 UTC (Tue) by skx (subscriber, #14652) [Link]

Or just use asql which has a nice built-in shell for live queries, or the ability to run queries from the command line.

Special filenames

Posted Mar 28, 2009 11:22 UTC (Sat) by jengelh (subscriber, #33263) [Link]

Here you have your Useless Use Of Cat Award.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds