Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Reason for Find invalid switch error

by Anonymous Monk
on Sep 18, 2012 at 07:17 UTC ( #994213=note: print w/ replies, xml ) Need Help??


in reply to Reason for Find invalid switch error

Do you see output after END?

print "find /D/ARCHIVE/BIOS/PRTFILES -mtime +1 -exec rm -rf {} \\" __END__ find /D/ARCHIVE/BIOS/PRTFILES -mtime +1 -exec rm -rf {} \

Is that valid linux command?

I don't linux, but it doesn't look particularly valid to me

Figure out how to work the linux command from linux shell, and then wrap it up in perl script

Once you have a working command, for example, saved as myshellscript.sh you can use

 perl -MData::Dump -MIO::All -e " dd map { io($_)->all } @ARGV " myshellscript.sh  > myperlscript.pl

to quote it properly for to give to system


Comment on Re: Reason for Find invalid switch error
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://994213]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2015-07-08 02:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (93 votes), past polls