![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Feb 2002
Location: Canada
Posts: 2,370
|
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
__________________
"People can have the Model T in any color - so long as it's black." - Henry Ford |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Feb 2002
Location: Seattle
Posts: 1,070
|
you need to use 'perl -pi -e' rather than just 'perl -e'. you might need to escape the ?, too.
__________________
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Feb 2002
Location: Canada
Posts: 2,370
|
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
__________________
"People can have the Model T in any color - so long as it's black." - Henry Ford |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Mar 2001
Location: Baltimore
Posts: 2,082
|
I have a kick ass linux search and replace script, hit me on ICQ or email. 7800287 wilbo at wilbo dot com
|
![]() |
![]() ![]() ![]() ![]() ![]() |