Help - Search - Members - Calendar
Full Version: add http to links
MSFN Forums > Coding, Scripting and Servers > Web Development (HTML, Java, PHP, ASP, XML, etc.)

   
Google Internet Forums Unattended CD/DVD Guide
RYU81
i have txt file with alot of links without begin http:// like this:

photobucket.com/albums/a13/brfitzp1/th_01.gif

and i want to add http:// to get this:

http://photobucket.com/albums/a13/brfitzp1/th_01.gif

is there easy way to do that without do it manual??
XPerties
Open the text file up in any text editor and click on edit/replace and in the first box for replace type photobucket.com and the second box type http://www.photobucket.com

Any item that is photobucket.com will turn into http://www.photobucket.com

biggrin.gif
egrath
Hi,

i personally would use the Cygwin Tools to manipulate Text Files the way you need. Use a Bash Script like this:

CODE
cat linkfile.txt | while read line
do
  echo http:\/\/${line} >> newfile.txt
done


(get cygwin at www.cygwin.com)

Egon
XPerties
LOL, that's a little more advanced than anyone needs to be on a txt file. woot.gif
Google Internet Forums Unattended CD/DVD Guide
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.