grep or fgrep ?

Richard cms01 at tampabay.rr.com
Sat Sep 23 17:09:24 UTC 2006


Thanks for the try, but your command did not work.


rick at 64bit:/usr/share/services/searchproviders$ sudo  fgrep "Keys" *desktop | 
{sed|cut|awk|sort|uniq} > /dev/shm/my_list.log
bash: {sed: command not found
cut: you must specify a list of bytes, characters, or fields
Try `cut --help' for more information.
bash: uniq}: command not found

--
Rich


On Saturday 23 September 2006 11:23 am, Luis wrote:
> 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
> 
> -- 
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
> 




More information about the ubuntu-users mailing list