Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

help with ed

sas
2010-03-29
2013-03-13
  • sas
    sas
    2010-03-29

    I want to update those task elements with an attribute of id whose value is validate-Mgr.  The thing I want to update is the attribute ignore-stderr of the element commandline.

    I tried  xml ed -u  '//task/execute/commandline' -v false

    A sample file I created is below

    <?xml version='1.0'?>   

    <?xml-stylesheet type="text/xsl" href="tests.xsl"?>

    <!DOCTYPE tasks PUBLIC '-//Somewhere//DTD ATOMS 1.0//EN' 'http://www.somewhere.com/tasks.dtd'>
    <tasks title="FullStackTest" debug="on" alllogical="true">

        <task id="validate-Mgr" basedir="utilities/fish" account="master">
            <depends>
                <on map-results-to-variable="OUT" ref="GetMgrDetails"/>
            </depends>
            <import name="SRC" basedir="testcases/9302/161"/>
            <execute>
            <commandline ignore-stderr="true">$BIN/validRab.pl $OUT/stdout.txt $SRC/rabConf.conf</commandline>          
            </execute>
        </task>
        <task id="mgen_iwf" basedir="utilities/mgen_scripts" account="iwfserver">
            <depends>
                <on ref="connect_calls" type="start-after-end" delay="1"/>
            </depends>       
                <execute timeout="150">
                 <commandline ignore-stderr="true">$BIN/rigMgen.pl $RESOURCE_SET_NAME port 9066-9070 output $RESULTS_DIR/9302_161_ul.drc </commandline>
            </execute>
        </task>
    </tasks>

     
  • sas
    sas
    2010-03-30

    OK, I figured it out myself.

    xml ed -P -t -u "//task/execute/commandline/@ignore-stderr" -v "false"

    works.