Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

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

by ikegami (Patriarch)
on May 18, 2009 at 03:20 UTC ( [id://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

Replies are listed 'Best First'.
Re^5: multiple file operations using perl one-liners
by jwkrahn (Abbot) 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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://764574]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2024-04-16 15:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found