How I can copy all file *.html to *.php with For loop?
help me...
this my script :
#!/bin/bash
list="$(ls *.html)"
for i in "$list"
do
newname=$(ls "$i" | sed -e 's/html/php/')
cat beginfile > "$newname"
cat "$i" | sed -e '1,26d' | tac | sed -e '1,21d' | tac >> "$newname"
cat endfiel >> "$newname"
done
or you have another ide ?
for f in *.html; do cp $f ${f%.html}.php; done
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With