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.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 10-06-2005, 02:51 PM   #1
a1ka1ine
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
a1ka1ine is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-06-2005, 02:55 PM   #2
FuqALot
Confirmed User
 
Join Date: Dec 2001
Location: Malibu
Posts: 3,817
http://kb.iu.edu/data/acoj.html

or

http://www.google.com/

Last edited by FuqALot; 10-06-2005 at 02:56 PM..
FuqALot is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-06-2005, 02:56 PM   #3
a1ka1ine
Confirmed User
 
Industry Role:
Join Date: Apr 2002
Posts: 3,387
Quote:
Originally Posted by FuqALot
this does not help my problem, but thanks for trying! believed me i used a search engine for 30 minutes and read pages of vi manuals with no success
a1ka1ine is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-06-2005, 02:57 PM   #4
FuqALot
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
FuqALot is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-06-2005, 02:58 PM   #5
FuqALot
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 [../]
FuqALot is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-06-2005, 02:59 PM   #6
a1ka1ine
Confirmed User
 
Industry Role:
Join Date: Apr 2002
Posts: 3,387
Quote:
Originally Posted by FuqALot
Ok hehe.. you can always open it in pico too, it's an easier editor. vi is kinda outdated

try: pico file.txt
thanks again heh, but the version of pico installed does not do replace for some reason :| and the box doesnt have the right glib library for the newer version and im not messing about with installing stuff i dont know about on a live server :S
a1ka1ine is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-06-2005, 03:05 PM   #7
FuqALot
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.
FuqALot is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-06-2005, 03:06 PM   #8
a1ka1ine
Confirmed User
 
Industry Role:
Join Date: Apr 2002
Posts: 3,387
trying what you suggested now
a1ka1ine is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-06-2005, 03:09 PM   #9
a1ka1ine
Confirmed User
 
Industry Role:
Join Date: Apr 2002
Posts: 3,387
Quote:
Originally Posted by FuqALot
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.
swapping out the delimiter is what i tried, and for some reason it finds every occurance of / and not the ../ before it.


damn voooddooooooooo :S.

!!! i will keep googling
a1ka1ine is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-06-2005, 03:10 PM   #10
willysbirthday
Confirmed User
 
Join Date: Feb 2004
Location: balmer
Posts: 436
:1,$s/\.\.\///g
__________________
oOooooooOOo
willysbirthday is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-06-2005, 03:10 PM   #11
willysbirthday
Confirmed User
 
Join Date: Feb 2004
Location: balmer
Posts: 436
. is wildcard, it must be escaped
/ is special char, it must be escaped
__________________
oOooooooOOo
willysbirthday is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-06-2005, 03:12 PM   #12
FuqALot
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.
FuqALot is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-06-2005, 03:16 PM   #13
a1ka1ine
Confirmed User
 
Industry Role:
Join Date: Apr 2002
Posts: 3,387
Quote:
Originally Posted by willysbirthday
:1,$s/\.\.\///g
oh shit - that worked perfectly! thanks! i had no idea a . was also a special character there.. thanks for the help
a1ka1ine is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-06-2005, 03:17 PM   #14
FuqALot
Confirmed User
 
Join Date: Dec 2001
Location: Malibu
Posts: 3,817
yay. hehe well.. close :D.
FuqALot is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-06-2005, 03:18 PM   #15
a1ka1ine
Confirmed User
 
Industry Role:
Join Date: Apr 2002
Posts: 3,387
Quote:
Originally Posted by FuqALot
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.
oh well. thanks for helping, and making this the longest thread on gfy about vi - we are setting history!
a1ka1ine is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-06-2005, 03:18 PM   #16
MrHits
Confirmed User
 
MrHits's Avatar
 
Join Date: Apr 2003
Location: Boulder, CO
Posts: 236
forget it.. someone already posted it .


doh
__________________
MrHits is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.