[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mandrake-newbie
Subject:    Re: [newbie] Grep..?
From:       Anne Wilson <CAnneWilson () tiscali ! co ! uk>
Date:       2002-07-01 19:17:24
[Download RAW message or body]

On Monday 01 Jul 2002 2:58 pm, you wrote:
> > > never mind... figured it out myself. first attempt AFTER i made the
> > > post.
> > >
> > > some days you are better off not stepping out of your bed.
> > >
> > > sorry.
> > >
> > > Damian
> >
> > But posting the solution might help others :-)
> >
> > Anne
>
> ok, ;o)
>
> the command looks like this:
>
> grep -i -A 2  ~/CDs/* -e searchterm
>
> will look inside of every file in ~/CDs/ directory, the " -i " switch
> means 'ignore the difference between upper and lowercase' so it can
> find "Gaim" when i search for "gaim" , then
> "-A 2" means i want it to show me two lines After the matching  line.
> and " -e searchterm" is... well, the search term.
>
> this one reports findings like this, for example:
>
> [user@localhost user]$grep -i -A 2  ~/CDs/* -e kylix
>
> /home/user/CDs/installers 7-kylix shit/
> /home/user/CDs/installers 7-DATA.Z*
> /home/user/CDs/installers 7-_INST32I*
>
> where "installers 7" is the file in which "kylix" was found ( in this
> case means the title of the CD), and the rest of the lines are files
> and subdirectories...
>
> of course i made an alias for this on my .bashrc so i don't have to
> remember this stuff..  ;oP
>
> Damian

Thank you ;-)

Anne


["message.footer" (text/plain)]

Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic