Re: easy BASH question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



there are numbers at the start of the line?

e.g. your regex is actually something more like "^[0-9]+ su"
and depending on your unix variant (e.g. not a linux, possibly)
you really mean egrep and not grep (although to a centos list, yes they're
likely actually the same, but it still might be worth noting)


On Mon, Sep 16, 2013 at 12:27 PM, James B. Byrne <byrnejb@xxxxxxxxxxxxx>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
>
> Thanks,
>
> --
> ***          E-Mail is NOT a SECURE channel          ***
> James B. Byrne                mailto:ByrneJB@xxxxxxxxxxxxx
> Harte & Lyne Limited          http://www.harte-lyne.ca
> 9 Brockley Drive              vox: +1 905 561 1241
> Hamilton, Ontario             fax: +1 905 561 0757
> Canada  L8E 3C3
>
> _______________________________________________
> CentOS mailing list
> CentOS@xxxxxxxxxx
> http://lists.centos.org/mailman/listinfo/centos
>



-- 
Even the Magic 8 ball has an opinion on email clients: Outlook not so good.
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos




[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux