GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Converting 'space' to 'underscore'? (https://gfy.com/showthread.php?t=97225)

Nat 01-01-2003 05:51 PM

Converting 'space' to 'underscore'?
 
I have a shitload of files with space's in there names, like "my hot page.html" and i am looking for some program that can convert all the spaces to underscore instead, so that the page would be renamed to "my_hot_page.html" instead...

If anyone know of such a program, please let me know!

Thanks, and Happy New Year to you all!

wwwcashmountain 01-01-2003 06:46 PM

This is a dead easy task under unix - are you running unix ?

Robert

Nat 01-01-2003 06:49 PM

Nope, but i have shell access, so thats no problem.. just let me know the commands and i will have it fixed :)

Nat 01-01-2003 07:17 PM

anyone? :)

Cohen 01-01-2003 07:21 PM

format c: (press "enter" 2 times REALLY fast)

Nat 01-01-2003 07:41 PM

Quote:

Originally posted by Cohen
format c: (press "enter" 2 times REALLY fast)
Thanks a lot for that post, real helpful!

Cohen 01-01-2003 07:45 PM

Quote:

Originally posted by Nat


Thanks a lot for that post, real helpful!

Anytime man :thumbsup - thats what im there 4

Nat 01-01-2003 07:54 PM

Quote:

Originally posted by Cohen


format c: (press "enter" 2 times REALLY fast)

Did you come up with that line all by yourself? wow, you must be proud!

Cohen 01-01-2003 08:01 PM

Quote:

Originally posted by Nat


Did you come up with that line all by yourself? wow, you must be proud!

what ? I just replyed to his remark..
What the hell is your problem?

extreme 01-01-2003 08:18 PM

Code:

perl -e {'@a=`ls *.html`; foreach $o (@a) { chop($o); $n=$o; $n=~s/ /_/g; $s = "mv \"$o\" \"$n\"\n"; system($s); };'};
... yay for perl.

Cohen 01-01-2003 08:24 PM

Quote:

Originally posted by extreme
Code:

perl -e {'@a=`ls *.html`; foreach $o (@a) { chop($o); $n=$o; $n=~s/ /_/g; $s = "mv \"$o\" \"$n\"\n"; system($s); };'};
... yay for perl.

I dont know SHIT about linux, but would just like to know, can you execute perl direct from the prompt?

Nat 01-01-2003 08:26 PM

Quote:

Originally posted by extreme
Code:

perl -e {'@a=`ls *.html`; foreach $o (@a) { chop($o); $n=$o; $n=~s/ /_/g; $s = "mv \"$o\" \"$n\"\n"; system($s); };'};
... yay for perl.

Great! thanks a lot man!!

extreme 01-01-2003 08:59 PM

Quote:

Originally posted by Cohen


I dont know SHIT about linux, but would just like to know, can you execute perl direct from the prompt?

yes, that very line was intended for execution directly from the prompt.


unixprompt$ perl -e {'PERL CODE GOES HERE'}

magnatique 01-01-2003 10:11 PM

let me know if you got it... otherwize, I got one that`ll do that windows based...

icq: 421704


All times are GMT -7. The time now is 02:04 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123