How to add simple bell command to bash

Often when running commands in Linux terminal I had to multitask and switch to another terminal.

That is good, but how to get notification that first task is completed?

We all get bell notification from the terminal.
So why not use it?

In Linux there is a tool called beep, but it is not by default in many distributions.

For the simple notification I found not as elegant, but simple solution.
If you send ASCII BEL (\007) to terminal it will beep.

So to “create” bell command just add to .bashrc

alias bell="echo -ne '\007'"

and reload it

source ~/.bashrc

Then you can use bell command to produce bell sound.
For example:

find / -name test.txt&&bell
Tagged with: , , ,

Leave a Reply