Sed help
by dilip_d21 from LinuxQuestions.org on (#5RTT8)
Hallo Team , Need a small help in sed 4.7
cat pom.xml
<artifactId>XXX-restapi-commons</artifactId> (line 10)
<version>1.0.88</version> (line 11)
[code]
sed -i \'/<artifactId>XXX-restapi-commons<\\/artifactId>/!b;n;c<version>\'$a\'</version>\' pom.xml
artifactId: No such file or directory
[code]
The above command works fine in sed 4.4 and the same is not working in 4.7 ubuntu (can some one point what is the mistake here ??
I just want to replace what ever version in line11 with the value in the variable a .
Thanks in advance
cat pom.xml
<artifactId>XXX-restapi-commons</artifactId> (line 10)
<version>1.0.88</version> (line 11)
[code]
sed -i \'/<artifactId>XXX-restapi-commons<\\/artifactId>/!b;n;c<version>\'$a\'</version>\' pom.xml
artifactId: No such file or directory
[code]
The above command works fine in sed 4.4 and the same is not working in 4.7 ubuntu (can some one point what is the mistake here ??
I just want to replace what ever version in line11 with the value in the variable a .
Thanks in advance