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 it's 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 manually the current date then it works.
What am I doing wrong?