D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] grep searches

 

On 05/08/12 14:13, paul sutton wrote:
> Hi
>
> Using grep to search my history for where I have used the dd command
> if I do
>
> history | grep -e dd
>
> I get
>
> 1079  sudo sudo add-apt-repository
> ppa:danielrichter2007/grub-customizer 1080  sudo add-apt-repository
> ppa:danielrichter2007/grub-customizer 1803  sudo dd bs=1M
> if=./2012-07-15-wheezy-raspbian.-15- of=/dev/sdc 1805  sudo dd bs=1M
> if=./2012-07-15-wheezy-raspbian.img of=/dev/sdc
>
> (this is shortened)
>
> if I wanted to not include add and just instances of dd how do I do
> this,  I tried
>
> history | grep -e 'd[d]' from the o'reilly grep reference but that
> didn't work,  am I doing things right and what should i be using
>
> I think i need some sort of explicit search option but not even sure
> if what I am doing above is the right way to do things anyway,  even
> though it works.
>
> i need something like equal to "dd" not equal to "*dd"  i guess,   i
> think not equal to is == not sure.
>
> thanks
>
> Paul
>
>

history | grep -w dd

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq