Starting with this,
example.txt
1.qwer
2.asdf
3.xzcv
4.cbvn
5.erty
Going to this,
apendedtext.txt
1.append
2.qwer
3.asdf
4.append
5.xzcv
6.cbvn
7.append
Starting with this,
example.txt
1.qwer
2.asdf
3.xzcv
4.cbvn
5.erty
Going to this,
apendedtext.txt
1.append
2.qwer
3.asdf
4.append
5.xzcv
6.cbvn
7.append
Assuming you added the line numbers for simplicity and that the output is missing the 8th line "erty" you can get around with a simple awk one-liner:
If you want to manipulate the line numbers too you could remove and add them back: