--- Jeff Westman <[EMAIL PROTECTED]> wrote: > Anthony J Segelhorst <[EMAIL PROTECTED]> wrote: > > 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 curly 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 () > > Well, that is the problem then. You have to use the curly braces.
My bad, {} and () look the same in the font type, sorry. I tried your shell example and it worked for me (perl 5.8). But as also mentioned, you really should try to avoid shelling out, and use File::Find and unlink(). > > 2. Eventually I want to use this command to a remove rm, but I was > > testing with an ls. __________________________________ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>