I'm trying to use the timestamps of a particular command I ran previously. Running something along the lines of history 10 | grep "keyword" gives me the output in the command line (my history preferences are set up to include a timestamps), but I can't actually figure out how to utilize this information in a script.
Is there any way to use this or another way to get the timestamps from a particular command? I'm trying to determine the last time a command was run, and if it was longer than a specific amount of time, run it again.