I want to change the value from 1521 to 1525 in FROM_HOST only in file gexhosts.cat:FROM_HOST   db201521TO_HOST     db201521Is there a way to do that or some work around?I would really prefer if we could use sed as I am using sed for many other activities of mine.
SED Search and Replace on Linux
linux;sed;regular expression;perl;replace
You can do:sed '/^FROM_HOST/ s/1521$/1525/' gexhosts.catTo edit the file in place:sed -i.bak '/^FROM_HOST/ s/1521$/1525/' gexhosts.catThe original file will be backed up as gexhosts.cat.bak and the modified file will be gexhosts.cat.If you don't want to keep a back up:sed -i '/^FROM_HOST/ s/1521$/1525/' gexhosts.cat