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)
-   -   Need Help with Search and Replace in Linux (https://gfy.com/showthread.php?t=72289)

ZoiNk 08-15-2002 11:44 AM

Need Help with Search and Replace in Linux
 
For some reason, this code doesn't want to work, what am I doing wrong.

perl -e "s/www.sexhit.com\/cgi-bin\/BAN_record?zoinkme\/0048000097\//www.wetnyoung.com\/216bf2e050c0a28437ea494d6aeb2a1e\//g;" `find . -name "*.*"`

Yes, it runs fine with no syntax errors, it just doesn't replace the instantances of the code. Yes, all one line. Yes, I know it would be case sensative. Any ideas?
Thanks,
ZoiNk

salsbury 08-15-2002 11:55 AM

you need to use 'perl -pi -e' rather than just 'perl -e'. you might need to escape the ?, too.

ZoiNk 08-15-2002 12:10 PM

I have got most of it working at the moment, my problem from going through it bit by bit is the ? mark. Problem is I don't know perl/unix commands that well. doing a /? doesn't escape it and just gives me an error. hm... ANyone know how to 'escape' a ? in this command?
ZoiNk

Wilbo 08-15-2002 12:13 PM

I have a kick ass linux search and replace script, hit me on ICQ or email. 7800287 wilbo at wilbo dot com


All times are GMT -7. The time now is 09:41 AM.

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