So in bash, When I do
echo \* *
This seems right, as * is escaped and taken literally.
But I can't understand that, when I do
echo \\* \*
I thought the first backslash escaped the second one thus two backslash "\\" will give me one "\" in literal. and * followed carrying its special meaning. I was expecting:
echo \\* \file1 file2 file3
Since \ is taken literally,
echo \* will behave just as
echo a*, which will find any file that starts with literal "a".
Follow up question, If I want to print out exactly like
\file1 file2 file3
What command should I use? e.g. like the following but I want no space
echo \\ * \ file1 file2 file3