I have a file A.txt
and when I try to append a text to end of Nth line, it's printing by creating a new line, is there any command which will print in the same line without creating a newline?
A.txt
hi all
how r u
hows going
I want to a a string to the line Nth line ( line 2 in this example)
hi all
how r u friend
hows going
when I try the command I am getting in google, it's coming like below
$ cat a.txt
hi all
how r u
friend
hows going