The echo command doesn't want to interpret backlash escapes (with -e option attached). For example, I want it to ring a bell with:
echo -e \a
Nothing happens, except it prints:
a
or
\a
How to turn on interpreting or how to fix it?
The echo command doesn't want to interpret backlash escapes (with -e option attached). For example, I want it to ring a bell with:
echo -e \a
Nothing happens, except it prints:
a
or
\a
How to turn on interpreting or how to fix it?
In echo -e \a the \ in front of the a will be stripped off from the argument to echo by the shell before echo is called. It is exactly equivalent to
echo -e 'a'
For echo to receive \a as backslash-followed-by-a, the \ has to be passed as is to echo. This is done either through
echo -e '\a'
or
echo -e \\a
If this will actually produce an audible or visible bell may depend on other settings.
You need to protect the \ from being interpreted by the shell. Try this:
echo -e '\a'
or
echo -e \\a