bash shell脚本:sed:如何在运行时用变量替换路径

时间:2019-01-28 10:48:31

标签: shell sed

#!/bin/sh


JAVA_DIR=/opt/bmc
echo "Editing $PRONTO_BIN/httpmon, setting correct java path to $PW_DIR/jre/bin/java"
sed -i 's/"$install_dir\/jre\/jre"/"$JAVA_DIR"/g' httpmon1 > httpmon2
echo "done"

这有什么问题

0 个答案:

没有答案