There is a change with UnIX version concerning these two platforms. I own a Power G4 Mac with OS 10.4.11 and a Mac Book Pro with Lion OS 10.7.2. There are some problems of compatibilities between the two UNIX versions.
Under OS 10.4.11, these three UNIX commands work, in order to produce sounds, even emitting a simple beep.
1) echo ^G (you need to type Ctrl-V Ctrl-G under /bin/tcsh to produce a bip).
2) osascript -e "beep"
3) qtplay /Users/stephane/Library/Audio/Sounds/Alerts/bigben.mp3
All of them work under OS 10.4.11, but unfortunately, none of them work under OS 10.7.2 !!
Well, qtplay isn't part of OS X. Do you have the audio bell set in your Terminal preferences? I have no idea why applescript isn't working but you can play sounds with afplay. Type the following for the proper syntax (the man page is sparse).
afplay -h
Of course there are a number of open source options.
Suddenly it works . Thanks!
You know the equivalent of old UNIX command osascript in order to run a script under UNIX ?
Does not seem to exist anymore under Lion ...