Page 2 of Command-line Interface Articles

Forcing yourself to use shell aliases

Fact: Shell aliases save you time. Fact: Saving time increases your productivity. Fact: Everybody wants to be more productive. Fact: Retraining muscle memory can be a pain in the ass. I have been fighting that last fact for a while now. I have the single character alias v pointed to […]

Using Keyring Access on the OSX Command-line

If you’re like me, you probably have a private dotfiles that supplements your public dotfiles repository. It contains private values like API keys and [hopefully not] plaintext passwords. There’s even a good chance you’re using git submodules or a setup script to manage the inclusion of the private stuff. Well […]

Command line all the things!

The start of 2014 has been an exercise in going back to basics for me. I’ve been re-evaluating my workflows when hacking and attempting to streamline as much as humanly possible. This has resulted in a ton of new aliases in an attempt to get my common CLI commands down […]

Getting PHP's version from the command-line

As you may already know, obtaining the version number of PHP is a simple php --version away. This is great if you just want to see the version number, but what if you wanted just the version number? First option would be to use write out some shell script to […]

Command-Line PHP

PHP is a powerful scripting language but did you know it can be used from the command-line as well? Using PHP from the CLI has many applications from checking what version of PHP is installed to being able to execute scripts and even check the syntax of a file. If […]

Recursive PHP Lint-inator

Just cleaning up a repository at work and came across a script I haven’t used in forever, a script to lint all PHP files in a directory, recursively. Expect something more stimulating soon as I found out the hard way that tumblr doesn’t seem to auto-save your posts once you’ve […]

Mass `svn add` script

So I have a tendency to add a bunch of new files to a project before actually doing a commit in Subversion. It’s usually not an issue, I go through an add each new file and then finally do my commit. Welp, I’m sick of it, so I wrote a […]

File Usage Reporting Script

In retrospect on writing this Python script, I probably could have pulled it off in a short Bash script. Maybe another day. Anyway, this latest utility script of mine takes a variable number of arguments, the first being the “needle” directory. The needle directory are the files you want to […]

Bash script to flatten a directory

I just came across an old CD of Fonts that I had purchased before I knew better. Well I didn’t want to throw the disc out without copying all the fonts to my system. All the fonts were broken up into directories that corresponded to the first letter of the […]

Recursive grep (grepr) for Solaris

So if you’re a Linux user that’s ever used Solaris, you know that a lot of the commands don’t translate exactly the same. One such issue is the lack of a recursive flag (-R) on the grep command. Not a problem though, bash is a powerful thing. Here’s my solution […]