Hi Uri,

uri> first off please edit the quoted part of posts. only keep the parts you
uri> are commenting or asking about.

- thanks, will try to do that every time from now on ... btw, how are you
editing yours, manually ... you look like you are doing your editing of the
quote programmatically ..

uri> i don't know exactly what you are trying to do. it is always important
uri> to be able to explain your goals in clear natural language. then you
can
uri> translate that to code.

- Oracle creates core dumps as directories. The script is supposed to check
the core dump directory and search for old core dump directories and remove
them. The core dump directory is the argument provided when the script was
invoked, i.e., ./remove_coredumps.pl /u01/oradump/cdump, /u01/oradump/cdump
is the core dump directory to search.

uri> but a simple answer is to just put a test inside the find sub so you
uri> don't push a file if it matches what is passed in @ARGV.

- Yep, this is the one that am thinking about ... just thought it will be
"safer" to use File::Find::Rule as an exact match to strip off the argument
before the array is processed in the for loop ... The script is to search
the core dump directory but exclude that directory, kinda like doing a grep
for ^/u01/oradump/cdump, /u01/oradump/cdump$/ and exclude that from the
directory to remove.



On Mon, Jun 7, 2010 at 4:32 PM, Uri Guttman <u...@stemsystems.com> wrote:

> >>>>> "np" == newbie01 perl <newbie01.p...@gmail.com> writes:
>
> first off please edit the quoted part of posts. only keep the parts you
> are commenting or asking about.
>
>  np> How do I exclude the command line argument from the "found"
>  np> directories ...  ??? Or would you recommend using File::Find::Rule
>  np> to exclude that directory ... ???
>
>  np> The script is supposed to search within that directory but exclude
>  np> that directory ... I just want to know if I can exclude it rather
>  np> than going thru the entire array and search for an exact match of
>  np> that command line argument ...
>
> i don't know exactly what you are trying to do. it is always important
> to be able to explain your goals in clear natural language. then you can
> translate that to code.
>
> but a simple answer is to just put a test inside the find sub so you
> don't push a file if it matches what is passed in @ARGV.
>
> uri
>
> --
> Uri Guttman  ------  u...@stemsystems.com  --------  http://www.sysarch.com--
> -----  Perl Code Review , Architecture, Development, Training, Support
> ------
> ---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com---------
>

Reply via email to