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. Anthony J Segelhorst Enterprise Systems Management Team Phone: 937-495-1876 Email: [EMAIL PROTECTED] Jeff Westman <[EMAIL PROTECTED]> 12/12/2003 03:58 PM To: perl_help <[EMAIL PROTECTED]> cc: Subject: Re: Wrapping Unix Command into Perl 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 {} \;`; 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') -Jeff __________________________________ 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> ________________________________________________________________________ This email has been scanned for all viruses by the MessageLabs SkyScan service._______________________________________________________________ ________________________________________________________________________ This email has been scanned for all viruses by the MessageLabs SkyScan service._______________________________________________________________ Note: Please update your email address for this user to reflect the new MeadWestvaco Corporation. MeadWestvaco employee email addresses are in the format of [EMAIL PROTECTED] This electronic message contains information from MeadWestvaco Corporation or subsidiary companies, which may be confidential, privileged or otherwise protected from disclosure. The information is intended to be used solely by the recipient(s) named. If you are not an intended recipient, be aware that any review, disclosure, copying, distribution or use of this transmission or its contents is prohibited. If you have received this transmission in error, please notify MeadWestvaco immediately at [EMAIL PROTECTED] _______________________________________________________________________