Mass Renaming Files: Difference between revisions
Jump to navigation
Jump to search
← 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
Navigation menu
Personal tools
Log in
Namespaces
Page
Discussion
English
Views
Read
View source
View history
More
Search
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