Hi, welcome to LQ!
If this is your actual script you're missing a closing back-tick on the
first line. If it's not there's something else not quite right...
Code:
Patvar=$(date +"%Y%m%d")
touch test$(date +"%Y%m%d").txt
Fname=$(ls | grep ${Patvar})
echo ${Fname}
test20110825.txt
This behaves the same w/ back-ticks.
Cheers,
Tink
P.S.: Darn, I was AFK for too long on that one ;D