>
> Anthony J Segelhorst <[EMAIL PROTECTED]> wrote:
>
> > I am trying to wrap the following Unix command into perl and having a
> few
> > issues:
> >
> > find /var/spool/Tivoli/backups -name "DB_*" -mtime +10 -print -exec ls
> {} \;
> >
> >
> > I have tried (and nothing to seems to work):
> >
> > $temp = `find /var/spool/Tivoli/backups -name "DB_*" -mtime +10 -print
> -exec ls {} \;`;
> > system `find /var/spool/Tivoli/backups -name "DB_*" -mtime +10 -print
> -exec ls {} \;`
> > !system `find /var/spool/Tivoli/backups -name "DB_*" -mtime +10 -print
> -exec ls {} \;`;
>
> Jeff Westman wrote:
> >1-- You are useing parens '( )' and should be using curley braces '{ }'
> >in your exec.
> >2-- Why are you using -exec ls? -print already gives you the same
output
>
> >(unless you meant to write 'ls -l')
>
>
> 1. I am using {} and not ()
>
> 2. Eventually I want to use this command to a remove rm, but I was
> testing with an ls.
>
If all you are doing is a remove why not just do it in Perl with
File::Find and 'unlink'??
perldoc File::Find
perldoc -f unlink
Then you won't have to worry about all of the issues with shelling out....
http://danconia.org
--
Boycott the Sugar Bowl! You couldn't pay me to watch that game.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>