Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^4: multiple file operations using perl one-liners

by ikegami (Pope)
on May 18, 2009 at 03:20 UTC ( #764574=note: print w/ replies, xml ) Need Help??


in reply to Re^3: multiple file operations using perl one-liners
in thread multiple file operations using perl one-liners

Is there any advantage to this variant? It's longer and buggy (missing chomp). It's also less clear due the weird use of => to separate two of three arguments, especially when it's also used to associate the arguments to the command.

Either way, I just realised du is useless.

perl -e'system zip => "-d", $_, "*exe*" for @ARGV' */*/old.zip


Comment on Re^4: multiple file operations using perl one-liners
Select or Download Code
Re^5: multiple file operations using perl one-liners
by jwkrahn (Monsignor) on May 18, 2009 at 06:00 UTC

    TMTOWTDI    ;-)

    perl -e'system "zip", "-d", $_, "*exe*" for <*/*/old.zip>'
      That fails for paths with spaces. That may not be a problem for the OP, but it would be for me.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2014-12-20 01:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (94 votes), past polls