将/分隔符换成冒号: 例如: sed -i "s:JDK_PATH=.*:JDK_PATH=${jdk_path}:g" ${env_file} 转载于:https://www.cnblogs.com/hime/p/5705895.html