在Bash脚本中使用“type -p”命令替换“which”命令
例如,原代码中使用which命令查找可执行文件:
path=$(which some_executable)
可以将其替换为使用type -p命令:
path=$(type -p some_executable)
上一篇:Bash脚本错误:OCI运行时执行失败
下一篇:Bash脚本错误:(standard_in)1:语法错误