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  ? 
I cannot change the format in the file variable as this is defined by 
someone else given..
I could split the teststring in parts and test against
$part1\W*$part2 etc. but this would mean changing several other 
programms that functions ok.

sigh never cleanup a programm that functions 


Thanks 
Eric Wolzak
http://leaf.sourceforge.net/devel/ericw


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

Reply via email to