You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
echo${DB_HOST}if [ -z${DB_HOST} ] ;then
local_host=`hostname -i`
sed "s_localhost_${local_host}_" conf/storage/db.conf.sample > conf/storage/db.conf
else
sed "s_localhost_${DB_HOST}_" conf/storage/db.conf.sample > conf/storage/db.conf
fi
Issue: sed failed to replace db url with _ underscore in conn string, e.g.
$ sed "s_localhost_mongodb://user_name:LADo$iu47&dlahj%a@mongodb-host.com:12345/?a=true&b=foo&c=bar" conf/storage/db.conf.sample > conf/storage/db.conf
sed: 1: "s_localhost_mongodb://f ...": bad flag in substitute command: 'n'
Potential solutions:
It maybe use other delimiter that not in string with sed.
use jq, e.g. jq '.timeseries.url = "mogodb://..."' conf/storage/db.conf.sample.
Source:
Issue:
sed
failed to replace db url with _ underscore in conn string, e.g.Potential solutions:
jq
, e.g. jq '.timeseries.url = "mogodb://..."' conf/storage/db.conf.sample.The text was updated successfully, but these errors were encountered: