Is your sweep utility something like this? (Note: untested)
Then you execute it like: ./sweep 'dir' 'command -with args'#!/usr/bin/perl use strict; use warnings; use Cwd; my $command = shift; apply( @ARGV ); # takes a directory to start in, and a command # to apply recursively sub apply { my $curdir = cwd; my ( $dir, $command ) = @_; return unless chdir $dir; system $command; if ( not opendir DIR, '.' ) { chdir $curdir; return; } my @children = grep { -d && !/^\.\.?$/ } readdir DIR; closedir DIR; for my $child ( @children ) { apply( $command, $child ); } chdir $curdir; }
In reply to Re: If I had a Free Two Months...
by kelan
in thread If I had a Free Two Months...
by samizdat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |