I want to display the events in a file after a certain time. I have a bash shell variable $DateMin as shown below that I am passing to awk:
echo | awk -v Date="$DateMin" '{print Date}'
2023-04-28 11:2
The following works where I specify the same string that is in the variable:
tac file.log | awk -v Date="$DateMin" '!flag; /2023-04-28 11:2/{flag = 1};' | tac
But when I try to used the Date variable, it doesn't work. It appears to show the entire file:
tac file.log | awk -v Date="$DateMin" '!flag; /Date/{flag = 1};' | tac
Any ideas of how to make this work?