Jump to content
Toggle sidebar
Redbrick Wiki
Search
Personal tools
Create account
Log in
Navigation
Main page
Index
Random page
Categories
Community
Encyclopedia
Helpdesk
How To
Humour
Hardware
Jobs
Music
Projects
Redbrick History
All Categories
Tools
Special pages
Printable version
Mass Renaming Files: Difference between revisions
Page
Discussion
English
Read
View source
View history
More
Read
View source
View history
← Older edit
Newer edit →
Mass Renaming Files
(view source)
Revision as of 13:09, 25 March 2006
75 bytes removed
,
25 March 2006
→In the Bash shell
Revision as of 09:22, 8 February 2006
(
view source
)
Phil
(
talk
|
contribs
)
m
No edit summary
← Older edit
Revision as of 13:09, 25 March 2006
(
view source
)
Goldfish
(
talk
|
contribs
)
(
→In the Bash shell
)
Newer edit →
Line 23:
Line 23:
=== In the Bash shell ===
=== In the Bash shell ===
for file in *.php; do
mv "$file" "
$
{
file
%
.php
}
.gif
"
; done
OLDIFS=$IFS; IFS="\n";
for file in *.php; do
newfile=`echo
$file
| sed -e 's/\
.php
$/\
.gif
/'`; mv $file $newfile
; done
; IFS=$OLDIFS
Goldfish
1
edit