Article 5RTT8 Sed help

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 advancelatest?d=yIl2AUoC8zA latest?i=KXkq3vn0SRI:h35RmnpKHzU:F7zBnMy latest?i=KXkq3vn0SRI:h35RmnpKHzU:V_sGLiP latest?d=qj6IDK7rITs latest?i=KXkq3vn0SRI:h35RmnpKHzU:gIN9vFw
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments