How can I return a string with a leading asterick (i'm using ksh)? With all the other metacharacters, I can return their "symbol", but not the asterick!
ex:
>x="*.c";echo $x
returns --> all files matching *.c , which is not what I want!
I want to return just the string *.c !!!
If I put a character in front of the *, e.g. x="w*.c", it will return the string w*.c
Other attempts I've tried that failed ...
>x=\*.c;echo $x --> returns file list
>x=*.c;echo $x --> returns file list
>x="\*.c";echo $x --> \*.c
>x='*.c';echo $x --> returns file list
Is this doable?
ex:
>x="*.c";echo $x
returns --> all files matching *.c , which is not what I want!
I want to return just the string *.c !!!
If I put a character in front of the *, e.g. x="w*.c", it will return the string w*.c
Other attempts I've tried that failed ...
>x=\*.c;echo $x --> returns file list
>x=*.c;echo $x --> returns file list
>x="\*.c";echo $x --> \*.c
>x='*.c';echo $x --> returns file list
Is this doable?