michaelsanford
Translator, Web Developer
I'm trying to make a script that copies all of the .php files in the current folder to files of identical name with .phps as the new extension (i.e., add an "s" to the end of the name). I don't care about overwriting existing .phps files.
I have a feeling it's something like:
find . -name *.php -exec cp $1.s
but I'm not sure about what goes after cp.
Basically I don't know how to pass the filename as an argument to the -exec cp part, then append an "s".
Any ideas?
I have a feeling it's something like:
find . -name *.php -exec cp $1.s
but I'm not sure about what goes after cp.
Basically I don't know how to pass the filename as an argument to the -exec cp part, then append an "s".
Any ideas?