- or download this
# Get list of remote files
my @remote_files= qx(ssh $uid $h 'find $dirname');
- or download this
# Munge filenames to commands:
my @commands= map { sprintf "mv -i '%s' '%s.bak'",
quotemeta($_), quotemeta($_)
} @remote_files;
- or download this
# Send list of commands to the remote side:
# First, a dry-run instead of actually doing that:
...
# Use this to actually do the remote execution:
#open $remote, "| ssh -q -l $uid $h";
print { $remote } join "\n", @commands;