I have the following code that works. How can I change this so that on the remote server, all files found recursively in $folder_name are renamed to their name with a .bak extension without knowing the names of the sub_folders?
#!/usr/bin/perl use strict; use warnings; use File::Basename; my @patterns = ("*.*"); my $cmd; my $uid = "something"; my $foldername; foreach $ftype (@ftype) { $cmd = "/usr/bin/ssh -q -l $uid $h 'for f in `ls $foldername/$ftype + 2>/dev/null`; do dos2unix \$f ; done'"; system($cmd); }
In reply to Rename all files on remote server to *.bak recursively by nancylt723
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |