Categories
status

Perl one liner executing a shell command on…

Perl one liner executing a shell command on files.

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

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

By microbe

Like to cook for microorganisms and human. Play football, tennis, and baseball.

Leave a Reply

Your email address will not be published. Required fields are marked *