#!/bin/bashif [ ! -f /var/log/myscript.log ];then echo "no previous execution";elseecho "previous execution $(grep "execution" /var/log/myscript.log | tail -n 1 | cut -d'-' -f1)"fiecho "$(date +%D) - execution" > /var/log/myscript.log