Last active
October 11, 2018 18:54
-
-
Save prashantksharma/8b138602eab17995c032d6e539910c70 to your computer and use it in GitHub Desktop.
Bash script to change all the php files with .html extension
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage: bash php-to-html.sh /path/to/folder | |
# If you get permission denied error do: | |
# sudo bash php-to-html.sh /path/to/folder | |
for f in `find $1 -name '*.php'` | |
do | |
#echo $f | |
previous=$f | |
updated=${f%.php}.html | |
mv "$f" "${f%.php}.html" | |
echo "FILE: $previous" | |
echo "RENAMED: $updated" | |
done |
Author
prashantksharma
commented
Oct 11, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment