0

After typing echo -ne '\a' && echo -ne '\a' in PuTTY session only single beep is being produced on local computer instead of two beeps.
What is the reason?

In PuTTY settings for this session, Beep using the PC speaker radio is checked and Bell is temporarily disabled when over-used checkbox is unchecked.

Piotr Dobrogost
  • 5,402
  • 14
  • 57
  • 78
  • Maybe the beeps are actually two, but very close to each other. Try echo -ne '\a' && sleep 1 && echo -ne '\a', to see if that's the case – Bruno9779 Feb 14 '14 at 11:33
  • @Bruno9779 Inserting `sleep` makes it work indeed. *Maybe the beeps are actually two* – if you mean speaker actually produces two beeps but very quickly then I don't think that's the case. I guess what happens is that `echo` is in fact asynchronous and returns before the first beep is finished and then the second `echo` is kind of lost as the first call is not really finished at the OS level. However I can't find any confirmation for this theory. – Piotr Dobrogost Feb 14 '14 at 12:23
  • I don't think that is the case. && waits for the first command to exit successfully before executing the following one – Bruno9779 Feb 14 '14 at 15:58

0 Answers0