I'm trying to make a function in my ~/.bashrc file that uses an echo command to pass its arguments through the pipeline. It works, but when I try to input a '\' character it disappears. If I type \\ (two '\') it succeeds. This heppens even with -E option...
So, how can I make the code below prints "foo\bar" instead of "foobar"?
func()
{
echo -E "${@}"
}