[SOLVED] grep a string with space

view full story

http://www.linuxquestions.org – Hi All, I am using Sun 5.9. I am putting the value "Feb 10" in variable 'c' here. Code: -bash-3.00$ c=`date | awk '{print $2 " " $3}'` -bash-3.00$ echo $c Feb 10 But when I am grep-ing value of 'c', I am getting this error. Code: -bash-3.00$ ls -lrth | grep $c grep: can't open 10 This is because there is a space between "Feb" and "10". Any other way out ? (HowTos)