In my code , there is such a part ;Namefile=$1for n in $Namefile*doecho $ndoneand just for this part's result is ;$ sh example.sh hw1hw1_evening_sun.txthw1_morning_sun.txthw1_out_si_wire.txthw1_script.shhw1_script2.shhw1_script3.shhw1_sun1.txthw1_sun2.txtwhich are the files whose name starting with hw1 , but I don't understand why $Namefile* takes these names.As far as I know * calls the the argument which the script receives.Why does this method work like that ? Could someone explain the logic behind it ? 
Why does  $Namefile*  give me such a result?
shell script;variable
I don't understand why $Namefile* takes these names.As far as I know * calls the the argument which the script receives.$Namefile expands to the value that you passed in (probably hw).  This means that $Namefile* after variable expansion becomes hw*. When this string is used in a location where it is interpreted as a filename, the * is special.  See pathname expansion in the man page.... bash  scans         each  word  for the characters *, ?, and [.  If one of these characters         appears, then the word is regarded as a pattern, and replaced  with  an         alphabetically  sorted  list of file names matching the pattern.