0
Centos 7でhttpdサービスのステータスを取得しようとしています。 Activeの値だけを印刷できるかどうかを知りたい場合、この例では無効です死んだ)コマンドの結果の一部のみを出力する
これは私が使用していますコマンドです:
[[email protected] ~]# service httpd status | grep Active
これは、そのコマンドの結果です。
Redirecting to /bin/systemctl status httpd.service
Active: inactive (dead)
これは私が望む出力です:非アクティブ(死んでいる)。