Need menu bar app to show output of Terminal command every 60s

menu bar

I need a menu-bar app* which will show me the output of a terminal command, and run that Terminal command every 60s or so.

Or I need a menu-bar app which will read the contents of a file, and update whenever that file is updated.

(The output would be no more than 3 or 4 digits)

Are there any such apps?

* neither the Dock nor the Desktop are workable alternatives. Needs to be the menu bar.

Update 2014-06-16: The answer from Jun 9 '12 at 2:15 did not end up working for me after all, so I'm still looking for a solution.

2020-04-04

I forgot all about having asked this question. For the past several years I have been using TextBar which is the perfect solution that I had always been looking for.

See also:

TextBar Puts Your Text into the Menu Bar – MacStories

Best Answer

#!/usr/bin/env ruby

require "osx/cocoa"
include OSX

app = NSApplication.sharedApplication 
statusitem = NSStatusBar.systemStatusBar().statusItemWithLength(NSVariableStatusItemLength)
while true
    statusitem.setTitle(rand(999))
    sleep 1
end
app.run

(If anyone who actually knows Cocoa wants to improve this, feel free to edit.) I more or less just copied the script from taw's blog: Personal experience points and OSX menulets, which was mentioned in display - Is there a way to have AppleScript output displayed in the menubar? - Apple.