Chinaunix

标题: service nginx configtest如何获取结果 [打印本页]

作者: shell_1    时间: 2019-05-20 16:07
标题: service nginx configtest如何获取结果
service nginx configtest如何获取结果,谢谢

作者: shell_1    时间: 2019-05-21 10:07
s=`命令`不行?
作者: waker    时间: 2019-05-21 10:10
s=$(cmd &>1)
作者: shell_1    时间: 2019-05-21 10:25
回复 3# waker

-bash-4.1# s=$(service nginx configtest &>1)
-bash-4.1# echo $s

还是空的


作者: shell_1    时间: 2019-05-22 09:42
回复 3# waker

群主,再帮忙看下





欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2