Posts

Showing posts with the label unix

Funny BASH snippets

echo howdy /bin/echo howdy /bin/../bin/echo howdy /bin/echo* howdy cd /bin echo* howdy *echo howdy ec*ho howdy ech? howdy ??h? howdy ech[o] howdy cd /tmp ec${howdy}ho howdy echo$howdy howdy ec''ho howdy ec""ho howdy 'ec'ho howdy "ec"ho howdy 'echo' howdy "echo" howdy ech\o howdy ec``ho howdy ec$()ho howdy ec`true`ho howdy ec$(true)ho howdy $yay echo howdy `` echo howdy `true` echo howdy `echo echo` howdy :&echo howdy if echo howdy;then :;else echo howdy;fi ! echo howdy { echo howdy ;} (echo howdy) eval echo howdy xargs echo howdy < /dev/null sh -c 'echo howdy' bash -c 'echo howdy' ssh localhost 'echo howdy' cd /tmp printf "all:\n\techo howdy" > Makefile make cd /tmp echo echo howdy > bash chmod +x bash ./bash cd /tmp cp /bin/bash bash echo echo howdy > bash ./bash . ./bash bash bash PATH=. bash alias howdy='echo howdy...

My luck with google on Valentine's day (UNIX Epoch 1234567890)

Image
The day before yesterday, something remarkable happened. I was preparing to go to sleep and turn my computer off. I have closed all applications and almost hit the power button when something flashed into my mind. I forgot to check something important: I wanted to do a web search, so I fired up Google. And to my great surprise the standard Google logo was replaced with a very interesting one. It said the following: Google $ date +%s 1234567890 I have understood that immediately, but I hesitated for a few seconds because of the surprise. When I typed it in a terminal, the output was as expected: 1234567897 (because of the overall reaction time). I clicked on the logo to see the background story. I wonder for how long that logo was enabled. Was it there for only a second? Am I really so lucky to have snitched the exact second of that happening?! Add to the fact that it was Friday the 13th in UTC (but already Valentine's day in CET). It's a pretty odd event anyway if you ...