Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to emit a "beep" on my computer while running a script on a remote machine?

Tags:

linux

bash

I run a long script on a remote machine and I would like to hear a beep when the script ends. On my machine I can add at the end of the script:

echo -e '\a' > /dev/console

but this is not working on the remote machine which complains :

-bash: /dev/console: Permission denied

How to achieve this ?

like image 973
Barth Avatar asked Nov 05 '22 01:11

Barth


1 Answers

You could run the script by passing it as a parameter to ssh and then echo the beep locally:

ssh user@host /path/to/script; echo -e '\a' > /dev/console
like image 69
blahdiblah Avatar answered Nov 07 '22 21:11

blahdiblah