|
|
|
||||
|
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
Industry Role:
Join Date: Apr 2002
Posts: 3,387
|
quick vi problem :| (search and replace)
im trying to search and remove all instances of "../"
im using %s@../@@gc but its not doing it.. anyone use this program? its fucking voodoo to me |
|
|
|
|
|
#2 |
|
Confirmed User
Join Date: Dec 2001
Location: Malibu
Posts: 3,817
|
|
|
|
|
|
|
#3 | |
|
Confirmed User
Industry Role:
Join Date: Apr 2002
Posts: 3,387
|
Quote:
|
|
|
|
|
|
|
#4 |
|
Confirmed User
Join Date: Dec 2001
Location: Malibu
Posts: 3,817
|
Ok hehe.. you can always open it in pico too, it's an easier editor. vi is kinda outdated
try: pico file.txt |
|
|
|
|
|
#5 |
|
Confirmed User
Join Date: Dec 2001
Location: Malibu
Posts: 3,817
|
Wait, you want to do ../ right, maybe you should add a backslash in front of the slash, or maybe you should try [../]
|
|
|
|
|
|
#6 | |
|
Confirmed User
Industry Role:
Join Date: Apr 2002
Posts: 3,387
|
Quote:
|
|
|
|
|
|
|
#7 |
|
Confirmed User
Join Date: Dec 2001
Location: Malibu
Posts: 3,817
|
See, in perl i would have either used the backslash idea or the [../] idea. If they don't do anything, then try: s^../^^g
if that doesnt do anything then you should get the file to notepad and do it there, but that might leave windows newlines you don't want hehe. |
|
|
|
|
|
#8 |
|
Confirmed User
Industry Role:
Join Date: Apr 2002
Posts: 3,387
|
trying what you suggested now
|
|
|
|
|
|
#9 | |
|
Confirmed User
Industry Role:
Join Date: Apr 2002
Posts: 3,387
|
Quote:
damn voooddooooooooo :S. !!! i will keep googling |
|
|
|
|
|
|
#10 |
|
Confirmed User
Join Date: Feb 2004
Location: balmer
Posts: 436
|
:1,$s/\.\.\///g
__________________
oOooooooOOo |
|
|
|
|
|
#11 |
|
Confirmed User
Join Date: Feb 2004
Location: balmer
Posts: 436
|
. is wildcard, it must be escaped
/ is special char, it must be escaped
__________________
oOooooooOOo |
|
|
|
|
|
#12 |
|
Confirmed User
Join Date: Dec 2001
Location: Malibu
Posts: 3,817
|
That's probably since a '.' is usually preserved for something too... that's why I suggested [../] instead of ../, which is the way to go with perl hmm.. i have no idea then.
|
|
|
|
|
|
#13 | |
|
Confirmed User
Industry Role:
Join Date: Apr 2002
Posts: 3,387
|
Quote:
|
|
|
|
|
|
|
#14 |
|
Confirmed User
Join Date: Dec 2001
Location: Malibu
Posts: 3,817
|
yay. hehe well.. close :D.
|
|
|
|
|
|
#15 | |
|
Confirmed User
Industry Role:
Join Date: Apr 2002
Posts: 3,387
|
Quote:
![]() |
|
|
|
|
|
|
#16 |
|
Confirmed User
Join Date: Apr 2003
Location: Boulder, CO
Posts: 236
|
forget it.. someone already posted it .
doh |
|
|
|