A file mytext.txt has in line number 20
<mytext=SO svn=myrepo number=2.1.0>
using SED or AWK I would like to change the line number 20 of mytext.txt to
<mytext=SO svn=myrepo number=2.1.6>
A file mytext.txt has in line number 20
<mytext=SO svn=myrepo number=2.1.0>
using SED or AWK I would like to change the line number 20 of mytext.txt to
<mytext=SO svn=myrepo number=2.1.6>
awk 'NR==20{$0="NEW TEXT"}7' file
next time do some man sed/awk before post.
with sed:
sed -ri '20 s/2.1.0/2.1.6/g' file