I have tried to print the commands which are executed today from history file using sed command by putting the range but i am unable to get it.can anyone help with this is script.I am pasting the script below that i have tried .
today=$(date "+%F")
echo $today
yest=$(date --date="yesterday" +"%F")
echo $yest
history | sed -n "/ $yest/,/$today/p" > /home/pest.txt