Spaztastik

Spaztastik provides “fire performers,” DJs, and rave equipment (lighting, decorations, etc).

It’s run by friend Scott, who worked with me at a startup. He was working as a sysadmin, but at the same time was a certified EMT, who was an acrobat and stunt-rode motorcycles for fun.
Web link of note: Spaztastik
(At http://www.spaztastik.info/)

Magic “which”

I’m using .bash. For whatever reason, it doesn’t detect aliases!

This bit me on the ass recently: a party who shall remain nameless had the default grep aliased:

alias grep='grep -i'

Yuck.

So when I searched for some debugging info, I got thousands of lines of false positives. Very bad.

But when I did a “which grep” it just told be the location of the executable. Not that it was aliased. So it looked like my grep (bash on debian) was broken!

What I wanted for which is:

  • if there is an alias, display the alias
  • if not, display the path of the executable

So the magic command to make which behave like it should is:

alias which='alias | /usr/bin/which --read-alias'

Just kidding. What that does is “crash your bash.” Who knows why. Crebbs told me that’s what it was (so much for nameless) and I almost locked myself out of my computer.

Turns out the “magic” command is simply

type

which is built in to bash. Gah!