badcatowner# cat wants > /food
-bash: /food: Permission denied

Get it?

Few days ago, I cam across some Unix command-line jokes, for example man woman. You can google for those, most of them involving sexual humor, some political satires, or just a good laugh if you are nerdy enough to get the joke.

Because of those jokes, they presented themselves to me as a suitable example to demonstrate GNU Recutils, which is a set of utilities to maintain plain text database, called recfiles.

And I used it to create the cmdjokes database, which was my second recfile. A few months back, I wanted to create a database, but I don’t want to touch those heavy-duty databases, I just wanted a very simple file which I could query with some criteria and all can be done in command-line. After digging into Portage tree, I found GNU Recutils and it met my needs perfectly.

https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCcvHPtL4LAZWFigWbkcMtILrWchrEIjdelxfg43d_BZZKvgpR3G_jxFy3Ial9G5zN_bJAJI2xs0q5XErLoyI0iKbK_UlPCs3C0i5v8CBhAATiLEmjmERZd-Zni7voiDDGQdcMjT4HqEc/s800/2013-07-22--14%253A10%253A48.png

You can query and use template to display the results as you can see in the screenshot, the template can also contain ANSI escape code, that’s how it gets the colors. The templating feature isn’t as powerful as others, you don’t have much functions, but it’s enough to show the results.

There are more jokes than I have inputted into the database on Internet, but many were using csh which I don’t have on my system, so I can’t confirm if the output is still the same after two decades. In fact, Bash is only shell I have. Why would you want to have second shell, if you ain’t even good at first one? If you are good at first one, then there is no reasons to install second shell.

Off-topic: If your name is Grey, then you have the right to be “Fifty Shells of Grey.” Bad joke, thought so. By the way, check out this crazy Quine Relay, I nicknamed it as “Fifty Langs of Quine.” Who in the right mental state would want to install 50 compliers, interpreters, or whatsoever they are called, in order to have that wheel spinning?

Anyway, if you have some good jokes, add to the Gist; if you just want to laugh, then pick one to get the list of jokes:

curl https://gist.github.com/livibetter/6051556/raw/cmdjokes.txt
wget https://gist.github.com/livibetter/6051556/raw/cmdjokes.txt -q -O -