Subject: sed clean my file

From: 杨公所 <[email-masked]>
Date: Fri, 21 Aug 2020 11:48:44 +0800 (CST)

Dear sir:
 
          I exec sed -iBAK "s/bms_address=\".*\" server_name/bms_address=\"$LOCALADDR\" server_name/" myfile in my startup script , centos7, the script chkconfig --add;  but it often clean myfile

          I don't know why? Can you help me.

         best wishes to you. Look forward to your reply

sed (GNU sed) 4.2.2
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Jay Fenlason, Tom Lord, Ken Pizzini,
and Paolo Bonzini.
GNU sed home page: <http://www.gnu.org/software/sed/>.
General help using GNU software: <http://www.gnu.org/gethelp/>.
E-mail bug reports to: <[email-masked]>.
Be sure to include the word ``sed'' somewhere in the ``Subject:'' field.