$ ls -d *.php3 | sed 's/\(.*\).php3$/mv "&" "\1.php"/' | sh
What we use here is sed replacing the part of the string (thanks to regular expression) with mv command and piping it to sh to which executes it. The detailed explanation of this process can be found here.
No comments:
Post a Comment