【发布时间】:2017-02-27 21:39:08
【问题描述】:
我有一个名为 script.sh 的 shell 脚本。我需要找到这个脚本并在脚本中更改值
发件人:
bash $current_dir/run.sh
到
./run.sh.x
我的解决方案是这样的:
find -maxdepth 10 -name "script.sh" -exec sed -i 's#bash '$current_dir'#run.sh#.#runs.sh.x#' {} \ ;
但我的命令仍然不起作用。知道如何在我的 shell 脚本中用新字符串替换这个字符串吗?
【问题讨论】: