当我跑步时:
sudo /usr/local/nginx/sbin/nginx -t
我回来了:
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
我只想要最后一行,所以我运行:
sudo /usr/local/nginx/sbin/nginx -t | sed -e '$!d'
但是我和没有sed的感觉一样。