Tools To Add Some Spice To Your UNIX Shell Scripts
cyberciti.biz
cyberciti.biz
Automating some more complicated stuff is just a pain in the ass to write and maintain if you just use bash, sed, awk, grep and friends. Free your mind and don’t be afraid to pull out Perl, Ruby or Python and apply liberally.
tput and reset are present.
If you really have a VT serial terminal, then setleds is going to be an echo and a tr to ship out the escape sequence. Might be a different (or easier) way...
If you're working with a standard Mac keyboard (and not a VT terminal), here you go http://googlemac.blogspot.com/2008/04/manipulating-keyboard-...
Applescript can do dialogs (there are hooks in Xcode) or the Applescript editor. (You can get the scripts stuff up in the menu bar for quick access.)
logger is present in Mac OS X.
pmset is a path akin to setterm.
smbclient is available. (Few Windows boxes have this path open, however.)
There are various approaches for the tcp stuff. Start with nc (netcat), which is built in.
It is possible to use Python to display GUIs from the command line on Mac OS X, e.g.
env VERSIONER_PYTHON_PREFER_32_BIT=yes python
>>> import wx
>>> app = wx.PySimpleApp()
>>> wx.MessageBox("hello, world")
AppleScript is capable of this, but "osascript" doesn't allow GUIs to pop up when run from a shell.