Subject: | |
From: | |
Reply To: | |
Date: | Fri, 20 Nov 1998 08:45:47 -0500 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Another dumb question from a POSIX dummy (me).
I'm trying to do a "grep" on all files in a particular directory and all
its subdirectories and I'm running into some problems. Perhaps one of the
POSIX gurus knows a solution. Here is what I have tried (and what I've
learned):
o Since "grep" only allows a file or directory (but no recursive
directories), I figured I'd use "ls" to generate a list of files in
the directory and its subdirectories, then use "xargs" to turn the
file names into targets for "grep".
o I know that in the CI I can use:
listfile /COMM/DOC/html/,6
to get a list of all files in the directory and all files in its
subdirectories, but this is an MPE solution and I'm trying to use
POSIX.
o I know that "ls -Rx1 /COMM/DOC/html" will generate a list of files
in the directory and its subdirectories, but it doesn't produce a
list of "fully-qualified" file names. Instead, it lists the directory
name and then lists the files in that directory, then a blank line,
then the next directory name, then the list of files in that directory,
etc. This is not suitable for "xargs" and "grep".
Okay, what am I overlooking? How can I get "ls" to give me the kind of
file listing that the "listfile,6" command (above) gives me (or is there a
different command I should be using)?
Thanks!
John
--------------------------------------------------------------
John Korb email: [log in to unmask]
Innovative Software Solutions, Inc.
The thoughts, comments, and opinions expressed herein are mine
and do not reflect those of my employer(s), or anyone else.
|
|
|