Linux technical support - [email protected]


sed

# REPLACE IN FILE
sed -i s'/ETCD_INITIAL_CLUSTER_STATE="new"/ETCD_INITIAL_CLUSTER_STATE="existing"/'g /etc/etcd/etcd.conf

# REPLACE
sed 's/A/B/g'

# sed replace carriage return with space
sed ':a;N;$!ba;s/\n/ /g'

# Sed change parameter in config
echo Password="123" | sed  's/\(Password=\).*$/Password=555/'
echo Password = "123" | sed 's/\(Password = \).*$/Password = "777"/'

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>