http://qs321.pair.com?node_id=764569


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

Or:

perl -e'system zip => -d => /\t(.*)/, "*exe*" for `du -b */*/old.zip`'

Replies are listed 'Best First'.
Re^4: multiple file operations using perl one-liners
by ikegami (Patriarch) on May 18, 2009 at 03:20 UTC

    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

      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.