Most Mac OS X power users know about the “open” command line tool which opens the files specified as arguments in their default (or a specified) OS X application. Additionally, many OS X text editors, such as TextMate (”mate”) and SubEthaEdit (”see”), come with command line tools which can be used to open files.
In the course of working on projects like server-side Objective-J, jack, and now narwhal, I’ve often had to write shell scripts that needed to know their location in the filesystem. Rather than hardcoding it, I prefer to infer it automatically at runtime. Unfortunately this isn’t as easy as you would expect.
Antonio Cangiano wrote a post about “Using Python to detect the most frequent words in a file“. It’s a nice summary of how to do it in Python, but (nearly) the same thing can be accomplished by stringing together a few standard command line tools.
I’m no command line ninja, but I’d like to think I [...]
Following an interesting discussion on Reddit about first class functions in C, I was inspired to see what I could do with this new-found knowledge. The result is what I affectionately call “GCCalc”, for reasons that will become clear below.
GCCalc is a simple command line calculator, much like the common bc calculator on many Unix [...]
The “which” Unix command lists the location of the first matching executable in your PATH. The GNU version of “which” has several extra features including the ability to display all matching executables in your PATH, not just the first. This is useful for finding duplicates, etc. Unfortunately, whatever version of “which” is included in Mac [...]
Posted by Tom on April 11th, 2007 — in Internet, Linux
As suggested by my friend and SCEC coworker Kevin Milner, I finally installed the GNU/Linux based OpenWRT replacement firmware on my house’s Linksys WRT54GL wireless router tonight. It gives you a minimal Linux distribution with most of the features of the WRT54GL’s original firmware built in, plus the ability to add a whole lot more.
Warning: include(/home/tlrobinson/tlrobinson.net/_footer-analytics.php) [function.include]: failed to open stream: No such file or directory in /home/tlrobinson/tlrobinson.net/blog/wp-content/themes/clean-look-150/footer.php on line 13
Warning: include() [function.include]: Failed opening '/home/tlrobinson/tlrobinson.net/_footer-analytics.php' for inclusion (include_path='.:/usr/local/php5/lib/php:/usr/local/lib/php') in /home/tlrobinson/tlrobinson.net/blog/wp-content/themes/clean-look-150/footer.php on line 13