logo       

Unexpected replacement: msg#00053

editors.sed.user

Subject: Unexpected replacement

Good day sedders,

I am trying to write a simple batch file to do some replacements
within an XML file using GNU sed version 4.0.7 on Windows XP.

Here is the line (#62)I'm targeting:

<menutree:TREENODE TEXT="Updates" EXPANDED="true"
TREENODESRC="xmlfiles/Menu.xml" IMAGEURL="images/folder.gif"
EXPANDEDIMAGEURL="images/folderopen.gif" FILENAME=""/>

Here is the snipit from the batch file that invokes sed:

SET /P Choice=Enter tree node text and press Enter:
sed 62s/TREENODE\x20TEXT.*EXPAND/TREENODE\x20TEXT\x3D\x22"%
Choice%"\x22\x20EXPAND/ <..\Incrementals.html > tmp.txt

My expectation is that user input text from the variable %Choice%
replaces "Updates". However, given an input of: New Node Name, here
is what ends up in tmp.txt:

<menutree:TREENODE TEXT="New Node Name"
EXPANDEDIMAGEURL="images/folderopen.gif" FILENAME=""/>

Why is sed not stopping at the first occurence of EXPAND?
I'm sure that the answer is simple, but I just can't see it.

Thanks,

Greg









------------------------ Yahoo! Groups Sponsor --------------------~-->
AIDS in India: A "lurking bomb." Click and help stop AIDS now.
http://us.click.yahoo.com/VpTY2A/lzNLAA/yQLSAA/dkFolB/TM
--------------------------------------------------------------------~->

--

Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/sed-users/

<*> To unsubscribe from this group, send an email to:
sed-users-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/






<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise