On Fri, 20 Apr 2001, Eric Wolzak wrote:

> Hello all Unix guru's 
> I got myself a problem 
> I need for a weblet a function that first check if teststring is already 
> inserted in a file, if not it will be inserted. This to prevent that 
> reloading will cause repeated insertions.
> 
> due to conversions ( Escape sequences) there can be a 
> variable amount of whitespace between 2 parts of the teststring
> therefore i used \W*
> 
> grep "1.2.3.4/24\W*eth0" file  does function but : 
>  
> now i wanted to change the space in teststring to \W* to be able to 
> test.
> <PROBLEM>
> cat teststring | sed 's/ /\\W*/g'     
> </PROBLEM>
> this results however in 1.2.3.4W*eth0 and not in 1.2.3.4\W*eth0
> I don't succeed in inserting the escape character. 
> experimenting with even more \\ :(
> Do I something wrong here, or is this a bug in the Eigerstein Sed -
> V 2.05  ? 

Works for me on LRP 2.9.8 with sed v2.05.

However, if in fact "teststring" contains variable whitespace, I am not
seeing a good search string to use instead of the single space.

---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<[EMAIL PROTECTED]>        Basics: ##.#.       ##.#.  Live Go...
Work:<[EMAIL PROTECTED]>              Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...2k
---------------------------------------------------------------------------



_______________________________________________
Leaf-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/leaf-devel

Reply via email to