How can I ring the audio bell within a bash script running under gnu screen?
From memory, Ctrl-G is the bell character, so I think that's why the second one worked. But screen can be picky over what characters it accepts as it takes Ctrl-A as the command code.
Try this
#!/bin/sh
# Ring the terminal bell
# echo "\a" # does not work in some shells
tput bel
I found this on rosettacode, hopefully it will give you some options