Lost Password?

Go Back   CodeCall Programming Forum > Software Development > General Programming

Vote on your favorite hash algorithm here!

General Programming Non language specific, Assembly, Linux/Unix, Mac and anything not covered in other topics. Talk about Programming Theory here.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-21-2006, 09:45 AM
Nightracer's Avatar   
Nightracer Nightracer is offline
Programmer
 
Join Date: Jun 2006
Posts: 130
Credits: 0
Rep Power: 9
Nightracer is on a distinguished road
Default Replacing with Shell Script and VI

How can I use a shell script and VI to replace entire strings in a file?

I know the VI code:
Code:
:%s/search/replace/g
I have words with forward slashes in them though which doesn't work.

Example: Replace http:// with ftp://

doesn't work. Anyone know how to make it work?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 11-03-2006, 08:33 AM
Nightracer's Avatar   
Nightracer Nightracer is offline
Programmer
 
Join Date: Jun 2006
Posts: 130
Credits: 0
Rep Power: 9
Nightracer is on a distinguished road
Default

bump - still looking for an answer!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 11-05-2006, 09:18 AM
Jordan's Avatar   
Jordan Jordan is offline
Administrator
 
Join Date: Nov 2005
Location: Hendersonville, NC
Posts: 7,397
Last Blog:
Tramp Variables
Credits: 1
Rep Power: 20
Jordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud of
Send a message via ICQ to Jordan Send a message via AIM to Jordan Send a message via MSN to Jordan
Default

You have to escape the characters:

http:\/\/ in order to use them as a regex. \ escapes.
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog
Don't hesitate to ask any questions that you have! Check out our ASCII Calculator!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Learning Shell Script Cosmet General Programming 0 11-14-2006 08:16 AM
Writing to a File - Shell Script Help! dirkfirst General Programming 2 10-03-2006 06:02 PM
Old file shell script Ronin General Programming 6 08-31-2006 09:01 PM
Shell: MySQL Database Backup Jordan Tutorials 0 08-15-2006 03:18 PM


All times are GMT -5. The time now is 10:51 PM.

Contest Stats

Xav ........ 1357.94
MeTh0Dz|Reb0rn ........ 1077.71
WingedPanther ........ 919.18
marwex89 ........ 906.86
morefood2001 ........ 900.18
John ........ 890.77
Brandon W ........ 770.65
chili5 ........ 312.39
Steve.L ........ 264.99
dcs ........ 234.34

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 83%

Ads