I am using "sed" command to find and replace a text in a file.
if the searched string is in the last line with no newline character in the end, it doesn't retrive this line. What is the solution to this?
i am using sed as:
can we have a solution to this
all that we have here is the workaround
from the above discussion
No solution with sed so far
awk has side effects
forcefully changing the file to have a newline and then sed'ing it (equi to the side effect of awk)
is there some way that we do not change the file and still get the desired result
lets say i do not have a option, but I have to keep the file intact with the last line without the newline character, then how do i substitue on this line without having the newline character at the end.