i am writing a bash script in which i am storing current date in a variable and then i am greping that variable . issue is its not working
currentdate= $(date +%b\ %d) echo "$currentdate" last |grep -E '$currentdate'>> /usr/IBM/HTTPServer7/logs/alert/users.txt
users.txt is showing empty . if i write mannualy the current date then it works what am i doing wrong?