[CentOS] replacing a line in a file

Jerry Geis geisj at pagestation.com
Sun Jan 25 03:17:38 UTC 2009

Jerry Geis wrote:
> I have a large file that has a line like:
> bindaddr=     ; some other text
> I want to replace the with my address and remove 
> everything
> else on the line to get:
> bindaddr=
> How can I do that?
> Thanks,
> jerry
I finally found a way to do it with sed.
Which is what I tried first but I did not have the . before the $

sed "s/bindaddr=.*/bindaddr="

sorry to have taken tracffic.


More information about the CentOS mailing list