|
sed help
I have to search and replace a string in a file and I am using the following command in a script.
sed "s/a/b/g" file
All the occurances of a are getting replaced by b except the last line since it does not have a return character at the end of line. If I enter space at the end of last last and
then use the above sed command then it works fine.
I want to know if there is a way I can replace all occurances. Else What is the command that I need to include in my script before the sed command so that I can get that extra space at the end of last line
|