![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
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 |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|