Reputation: 9
I am pretty new to bash scripting. I am trying to do a small project where I timestamp a bash command/alias. I am trying to timestamp when I update home brew. So before I run brew update, I would like to see when I ran the command last.
Upvotes: 0
Views: 60
Reputation: 38
If you run HISTTIMEFORMAT="%d/%m/%y %T " && history | grep "brew update"
, then it will print the date and time on the left of all the brew update commands.
Upvotes: 1