DOS versus UNIX sed question on special characters

DOS versus UNIX sed question on special characters

Post by Kompu K » Sat, 07 Aug 2004 04:04:00



Hello All:

I am porting some of my SED scripts onto my W2K computer. I downloaded
a DOS version of SED.

I am not sure if the syntax is exactly the same in both environments.

I will use my scripts to mass edit some html files.

I have the following questions:

Within a bat file on DOS what would be the following line:

s/http\:\/\/www\.xxx\.com/\.\.\//

I am trying to replace http://www.xxx.com with ../ here.

Thanks!

Deguza
(Post your replies here, my hotmail account is usually full due to
spam.)

 
 
 

1. sed with special characters

HI GUYS

    need help. I  want to use sed to replace   this words
"/usr/sbin/inetd -s" with the # infront it and replace it with
"/usr/sbin/inetd -s -t. My system informed me that  RE is replaced and
produce a 0 byte. is there  anyway I can do this?

this is what I did

sed 's/"/usr/sbin/inetd -s"/"#/usr/sbin/inetd -s -t/g'  inetsvc >
inetsvc.old

I am running on solaris 2.6
any idea?

2. apache virtual host problem

3. substitutie special characters & multiple CR's with sed

4. RedHat setup w/ ATI XPERT128

5. How Do I replace special characters with sed

6. blah - kmem ps utils break under 1.1.13

7. Sed: special character replacing

8. 2.4.20pre5 trivial compiler warning fix for irport.c

9. using sed to replace a special character

10. SED: How to replace with special characters?

11. replace special character with sed

12. Searching/replacing special characters in SED

13. Problem with a non-special "special" character