Category: Command-line Interface
-
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…