Home  |  Forums  |  914 Info  |  Blogs
 
914World.com - The fastest growing online 914 community!
 
Porsche, and the Porsche crest are registered trademarks of Dr. Ing. h.c. F. Porsche AG. This site is not affiliated with Porsche in any way.
Its only purpose is to provide an online forum for car enthusiasts. All other trademarks are property of their respective owners.
 

Welcome Guest ( Log In | Register )

> renaming mass file extensions (HELP), in Debian Linux
bd1308
post Apr 7 2005, 11:38 AM
Post #1


Sir Post-a-lot
*****

Group: Members
Posts: 8,020
Joined: 24-January 05
From: Louisville,KY
Member No.: 3,501



I know what i want to do...i have a bizillion .php files i need to get to be .php3 files....so my logic is like this:

rm *.php *.php3

but of course, that dont work.......

please somebody help (IMG:http://www.914world.com/bbs2/html/emoticons/pray.gif)
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
 
Reply to this topicStart new topic
Replies
bd1308
post Apr 7 2005, 12:18 PM
Post #2


Sir Post-a-lot
*****

Group: Members
Posts: 8,020
Joined: 24-January 05
From: Louisville,KY
Member No.: 3,501



QUOTE (tat2dphreak @ Apr 7 2005, 12:16 PM)
QUOTE (bd1308 @ Apr 7 2005, 01:05 PM)
QUOTE (tat2dphreak @ Apr 7 2005, 12:02 PM)
do this: (ksh scripting):

for x in *php
do
bname = $(echo $x |cut -d. -f1)
cp $x ${bname}.php3
done


then verify everything lookas as it should and mv the old php files into a temp directory to make sure the functionality still works

(IMG:http://www.914world.com/bbs2/html/emoticons/huh.gif) (IMG:http://www.914world.com/bbs2/html/emoticons/type.gif)

I use unix @ work daily... you can script a lot of things right on the command line... I use Perl (not the same perl though, file manipulation) and Korn daily... lemme know how it works for you

well can you tell me what i need to do to enter the script in? I did something and a little ">" thing poped up....is that what i need?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

- Lo-Fi Version Time is now: 8th June 2024 - 10:03 PM