how to use sed command
hi all
i wrote a script using sed to replace old text with new text.
and the script is like
#!/bin/bash
sed -i "s/Release: 1/Release: 1.%{mode}/" ./test1
and this is working fine if i execute it for the first time.
but the problem is when i execute it at the second time.
The output is
Release: 1.%{mode}.%{mode}
I want an option by which i can avoid this problem.
Is it possible to do that?
if not, please suggest me another method or command equivalent to sed.
Thank you.
|