On Mon Sep 16 16:34:31 UTC 2013, zGreenfelder zgreenfelder at gmail.com wrote:
On Mon, Sep 16, 2013 at 12:27 PM, James B. Byrne <byrnejb at harte-lyne.ca>wrote:
I am obviously missing something basic here but can someone explain to me what is wrong with the first statement, which returns nothing?
$ history | grep ^su $ history | grep su 2997 su -l 3024 su -l 3050 su -l 3054 su -l
there are numbers at the start of the line?
Duh! Thanks. I could not see the forest for the trees I guess. I ended up with the following as I wanted a visual scan of all variants not just the most recent:
history | cut -f1-3 -d " " --complement | grep ^su
This is in the bash shell on CentOS-6.4.