Problem with * when pass into variable.

Hello expert.

I have a little problem here.
I write a script and stuck some bug to fix.

I found the problem was about * and a sample of script is below.

line 1 is print * out
but line 3 print all name of files in the script's path. (but I want *)

I want to contain * in variable TEST and print it but seem not work.
Any idea? Thank you.

Sorry for my English and if this issue has been discuss before.
It hard to search for topic about a special character *.

$> VAR=*
$> echo "${VAR}"
*

Hope this is what you were trying

$ cat 1.sh
echo "*"
TEST="*"
echo "$TEST"
$ sh 1.sh
*
*
$

Thank you very much!!

That's work perfectly! :slight_smile: