Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.mac.system > #55079

Re: Question about wildcards in Unix

From Doug Anderson <ethelthelogremovethis@gmail.com>
Newsgroups comp.sys.mac.system
Subject Re: Question about wildcards in Unix
Date 2014-01-20 12:57 -0800
Organization Rare
Message-ID <nzvbxe4bhy.fsf@ethel.the.log> (permalink)
References (2 earlier) <52dc5ccf$0$58768$c3e8da3$12bcf670@news.astraweb.com> <1lfruh8.1ni6lfs1qgbzg2N%dempson@actrix.gen.nz> <52dc73f7$0$9776$c3e8da3$aae71a0a@news.astraweb.com> <1lfrnvi.f2pto8x4qimsN%mcarels@xs4all.nl> <200120140949112743%timstreater@greenbee.net>

Show all headers | View raw


Tim Streater <timstreater@greenbee.net> writes:

> In article <1lfrnvi.f2pto8x4qimsN%mcarels@xs4all.nl>, Maarten Carels
> <mcarels@xs4all.nl> wrote:
> 
> > JF Mezei <jfmezei.spamnot@vaxination.ca> wrote:
> > > On 14-01-19 18:43, David Empson wrote:
> > > > > If the current directory contains a subdirectory which has a
> > name ending
> > > > in ".c", then "ls -R *.c" will recursiely list the entire contents of
> > > > that subdirectory (and any other similarly named subdirectories in the
> > > > current directory).
> > > > Ahh. Thanks I understand now.
> > > > So, if I want to grep "mystring" in all C programs below current
> > > directory, how do I go about it ?
> > Find is youir friend.
> > find . -name \*.c -exec grep mystring {} \;
> > Read the manual page of find (man find). Find is your friend for this
> > kind of tasks, it can do all of that and more. Find is only a bit
> > prickly on the outside.
> > A long time ago there was this bug mentioned in the manual page:
> > BUGS
> >         The syntax is painful.
> > And so it is.
> 
> And it is this painfullness which causes me, five minutes after I
> foolishly decide I should learn a bit more about shells, to eject the
> computer through the window at high velocity. This happens from time to
> time.

I'll keep away from the sidewalk below your window.  Realize though
that the shell is extremely powerful (as are commands like "find,"
horrible though the syntax is).  So 5 minutes is not enough time to
learn more!

Back to comp.sys.mac.system | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Question about wildcards in Unix JF Mezei <jfmezei.spamnot@vaxination.ca> - 2014-01-19 17:19 -0500
  Re: Question about wildcards in Unix Siri Cruz <chine.bleu@yahoo.com> - 2014-01-19 14:42 -0800
  Re: Question about wildcards in Unix Joanna Shuttleworth <js@example.com> - 2014-01-19 22:46 +0000
    Re: Question about wildcards in Unix JF Mezei <jfmezei.spamnot@vaxination.ca> - 2014-01-19 18:16 -0500
      Re: Question about wildcards in Unix dempson@actrix.gen.nz (David Empson) - 2014-01-20 12:43 +1300
        Re: Question about wildcards in Unix nospam <nospam@nospam.invalid> - 2014-01-19 19:02 -0500
          Re: Question about wildcards in Unix dempson@actrix.gen.nz (David Empson) - 2014-01-20 17:41 +1300
        Re: Question about wildcards in Unix JF Mezei <jfmezei.spamnot@vaxination.ca> - 2014-01-19 19:55 -0500
          Re: Question about wildcards in Unix Jolly Roger <jollyroger@pobox.com> - 2014-01-20 03:00 +0000
          Re: Question about wildcards in Unix mcarels@xs4all.nl (Maarten Carels) - 2014-01-20 10:05 +0100
            Re: Question about wildcards in Unix Tim Streater <timstreater@greenbee.net> - 2014-01-20 09:49 +0000
              Re: Question about wildcards in Unix Doug Anderson <ethelthelogremovethis@gmail.com> - 2014-01-20 12:57 -0800
                Re: Question about wildcards in Unix JF Mezei <jfmezei.spamnot@vaxination.ca> - 2014-01-20 16:15 -0500
                Re: Question about wildcards in Unix Doug Anderson <ethelthelogremovethis@gmail.com> - 2014-01-20 14:10 -0800
                Re: Question about wildcards in Unix Tim Streater <timstreater@greenbee.net> - 2014-01-20 23:06 +0000
                Re: Question about wildcards in Unix Doug Anderson <ethelthelogremovethis@gmail.com> - 2014-01-20 16:39 -0800
                Re: Question about wildcards in Unix nospam <nospam@nospam.invalid> - 2014-01-20 18:44 -0500
                Re: Question about wildcards in Unix Doug Anderson <ethelthelogremovethis@gmail.com> - 2014-01-20 16:42 -0800
                Re: Question about wildcards in Unix Tim Streater <timstreater@greenbee.net> - 2014-01-21 10:23 +0000
            Re: Question about wildcards in Unix Jolly Roger <jollyroger@pobox.com> - 2014-01-20 18:43 +0000
      Re: Question about wildcards in Unix Doug Anderson <ethelthelogremovethis@gmail.com> - 2014-01-20 12:55 -0800

csiph-web