question of sed replace

Posted by chun on Stack Overflow See other posts from Stack Overflow or by chun
Published on 2010-05-05T14:10:51Z Indexed on 2010/05/05 14:28 UTC
Read the original article Hit count: 283

Filed under:
|

hi

i have a config file xml

<tflow name="CENTRE"
     inputDTD="/JOBS/cnav/etc/jobReporting/batch/dtd/dtd-ContactCentre.dtd"
     inputFile="/JOBS/cnav/etc/jobReporting/import/2010.05.02.CONTACTCENTRE.xml"
                 logPath="/JOBS/cnav/etc/jobReporting/logs/"
                 rejectPath="/JOBS/cnav/etc/jobReporting/rejets/"/>
            <tflow name="SKILL"
                 inputDTD="/JOBS/cnav/etc/jobReporting/batch/dtd/dtd-Skill.dtd"
                 inputFile="/JOBS/cnav/etc/jobReporting/import/2010.05.02.SKILLS.xml"
                 logPath="/JOBS/cnav/etc/jobReporting/logs/"
                 rejectPath="/JOBS/cnav/etc/jobReporting/rejets/"/>

my shell is aim to change, by example '2010.05.02.SKILLS.xml' with 'newdate.SKILLS.xml'

currently i think of SED, i wrote:

sed 's/(import\/)(\d{4}.\d{2}.\d{2})/$1$newdate/g' myfile.xml

it doesn't work,i test the pattern with RegExr(a site) which is fine.

is it a problem of synthesis of SED? thanks.

© Stack Overflow or respective owner

Related posts about linux

Related posts about sed