Hacker News new | past | comments | ask | show | jobs | submit login

    cat /var/log/syslog | grep -i 'problem'
is also a query on the `/var/log/syslog` "database".

What would be really cool is a RDBMS where the single pieces of data in the cells are related to each other. For example the user IDs in the authentication log could be matched with the IDs present in the request log.




Apache Drill lets you search logs using column base requirements.

https://cwiki.apache.org/confluence/display/DRILL/Querying+a...

It doesn't work on files with no extension yet or at least there's a bug report on it:

https://issues.apache.org/jira/browse/DRILL-1320?filter=-3


Why add the extra cat command?

grep -i 'problem' /var/log/syslog


because invariably you're going to want to recall this command from history and insert "grep -v HostnameIDontCareAbout" between the cat and the grep. or you're going to want to replace "grep -i 'problem'" with "awk '/problem/ { print $3 }". or you're going to want to do both.

people whine about 'useless use of cat' like it's still 1982, but the fact is that it's convenient for iterative development of a pipeline in situ and it costs nothing.


He's after this weeks "Useless use of cat" award: http://www.smallo.ruhr.de/award.html#cat

Good to see there's still some competitors out there.


What a silly thing to complain about.


It was light hearted, comes with a smiley now :)


pipelines read better left to right


    </var/log/syslog grep -i 'problem'


Have a look at lnav: http://tstack.github.io/lnav/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: