Bash

The blog is currently being ported from WordPress to over 12 years of static pages of content. If there's an article missing that you're hoping to see, please contact me and let me know and I'll prioritize getting it online.

HOWTO: Get a Mac, Python, Homebrew, PyEnv, and Bash aliases to play nicely

Okay, I’ll be blunt: I’m a Linux guy. I know, shocker. I’ve recently moved to an awesome new job and part of that role will be an area of developer advocacy which will require me to go to meetups and tech conferences from time to time, and talk about how freakin’ awesome my new employer is. And they are, srsly. You should sign up and use it if you’re thinking about building a news/activity feed/timeline in your app.

Continue Reading

Search and Replace in Bash script

I recently had a colleague ask me how to do in-line regular expression matching for a Bash shell script. Since Bash v3 only offers a regex matching check and not the full s/foo/bar/ regex syntax, I offered to look into other alternatives. My natural instinct was to look for a Perl cmdline regex parser, which works great if you’re manipulating a file and not shell variables. In the end, since he only needed a simple search and replace, and not an actual regular express, this sufficed:

Continue Reading