Originally Posted by descha
I want to substitute part of line in file, from ! to the end of file with string .How can I do that.Thank you
If this is 'urgent', why did you not attempt to look this up? Since you probably found this site with Google, did you not try to put that question in?? Lots of answers, such as:
's/<whatever/regex goes here>.*$/<replacement regex>/g'
As sycamorex says, showing effort of your own will likely get you help; showing ZERO effort won't.