Unix on a Mac OS X

Hi. I'm using a Mac computer to perform all my Unix operations. At the moment, I'm employing osascript to interact between windows and don't know whether the same is possible to do it on a BASH shell without calling osascript. If so, I would like to see an example of how to do it.

Many thanks in advance.