Convert from Ruby to simple shell stuff.