I am trying to write a bash script to get the logs from a certain timeframe by reading the log file
I am trying to use the following sed command
sed -n '/2019-12-09 03:47:26/,/2019-12-09 03:48:26/p' mqerror.log.20191209
It works fine as above, and able to retrieve the logs during that timeframe, but when i try with command substitution inside sed, itseems not working. kindly help
sed -n '/`date +'%Y-%m-%d'` 03:47:26/,/`date +'%Y-%m-%d'` 03:48:26/p' mqerror.log.`date +'%Y%m%d'`