Perl one liner executing a shell command on…


Caluquembe Perl one liner executing a shell command on files.

differentially e.g. copy all *.c files to new names, *.R.

perl -de 'foreach (@ARGV) {($new = $_) =~ s/c$/R/; system("cp $_ $new");}' *c


Leave a Reply

Your email address will not be published.