Tag Archives: bash

filenames with spaces

I downloaded Unity last week. My first bit of installation geekery was to push the documentation to marmaduke, my CentOS server. I drop the documentation directory into a virtual host and let apache serve the index (since I solved my Apache Directory Indexing problem a bit back.) However, I found that the pages had missing […]

bash uuid generator

Onliner bash scripts are handy but bash and common utilities don’t always work the same on the two systems I most use: Centos vs. OS X. centos $ cat /etc/redhat-release CentOS release 5.4 (Final) osx $ sw_vers | head -n2 ProductName: Mac OS X ProductVersion: 10.6.2 For example, I recently wrote a simple script to […]

bash date tricks

A quick usage note regarding the date util under bash. I sometimes want to convert between a unix timestamp and a formatted date string. I do it infrequently enough that I forget the syntax. This article is me writing down my notes. In the following example, I want to get timestamps and date strings for […]

use curl for api documentation

I’ve been working quite a bit with the rest plugin for Struts2. The really nice thing about this plugin is the way it cleans up Struts URLs. Makes them more rails-like. I chuckled when depressed programmer suggested that struts2 is “WebWork on drugs.” I hate struts2. I really do. Anyway, I have stripped down an […]

bash progress monitor

I have a remote machine that is used to store and process XML files. Recently, I had need to duplicate a directory of XML files (e.g., cp -r a b). It’s not really germane to the subject here, but this particular server has a whack configuration and I gotta rant before I continue. The office […]

grep and UTF-8

I needed to look up the various strings Apple uses to name the iTunes Library. First I tried to get name from the iTunes resource bundle echo “this won’t work…” echo “so don’t even try it” cd /Applications/iTunes.app/Contents/Resources/English.lproj cat Localizable.strings | grep ‘PrimaryPlaylistName’ But I quickly learned that grep doesn’t work on the strings file. […]