grep or fgrep ?

Luis lemsx1 at gmail.com
Sat Sep 23 15:23:48 UTC 2006


use the [pipe] luke

fgrep "Keys" *.desktop | {sed|cut|awk|sort|uniq} > /dev/shm/my_list.log

man sed
man cut
man sort
man awk
man uniq

ah, gotta love *NIX

On 9/23/06, Richard <cms01 at tampabay.rr.com> wrote:
> Have dozens of files in a folder and want to extract the following:
>
> all the files end with .desktop
>
> eg: google.desktop
> what to extract ( name of file ) and search string "Keys"
>
> eg:     fgrep "Keys" *.desktop ( bring back only one file ) there a dozens of
> files... pgpkeys.desktop:Keys=pgp,pgpkeys
>
> So, this tells me that pgpkeys.desktop "Keys"(string) is = to pgp
> and google.deskotp "Keys" is = to gg
>
> So, as you can see, I am trying to make a list of Keys as a output to screen
> or a text file for printing. This are the web shortcuts.
>
> So, any grep guru's ?
>
> Thanks-
> Rich
>
>
>
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>


-- 
----)(-----
Luis Mondesi
*NIX Guru

Kiskeyix.org

"We think basically you watch television to turn your brain off, and
you work on your computer when you want to turn your brain on" --
Steve Jobs in an interview for MacWorld Magazine 2004-Feb

No .doc: http://www.gnu.org/philosophy/no-word-attachments.es.html




More information about the ubuntu-users mailing list