use*_*439 5 linux bash scripting
所以我想验证特定命令的退出代码
runuser -s /bin/bash @user_name -c $command > /dev/null 2>&1 &
Run Code Online (Sandbox Code Playgroud)
如何查找命令是否runuser -s /bin/bash @user_name -c $command正确执行?我尝试使用,$?但它不起作用,因为它始终为0(重定向的结果为0)
如何找到该命令的退出代码?
| 归档时间: |
|
| 查看次数: |
2237 次 |
| 最近记录: |