Skip to main content

Instead of using the sed command like in therthe answer of Oxmel, it is enougthenough to use cut -d'=' -f 2cut -d'=' -f 2 for all kind of properties queried:

for example:

$ systemctl show -p ActiveState sshd | cut -d'=' -f2 active $ systemctl show -p SubState sshd | cut -d'=' -f2 running 

Instead of using the sed command in ther answer of Oxmel, it is enougth to use cut -d'=' -f 2 for all kind of properties queried:

for example:

$ systemctl show -p ActiveState sshd | cut -d'=' -f2 active $ systemctl show -p SubState sshd | cut -d'=' -f2 running 

Instead of using the sed command like in the answer of Oxmel, it is enough to use cut -d'=' -f 2 for all kind of properties queried:

for example:

$ systemctl show -p ActiveState sshd | cut -d'=' -f2 active $ systemctl show -p SubState sshd | cut -d'=' -f2 running 
Source Link
Mauri
  • 139
  • 3

Instead of using the sed command in ther answer of Oxmel, it is enougth to use cut -d'=' -f 2 for all kind of properties queried:

for example:

$ systemctl show -p ActiveState sshd | cut -d'=' -f2 active $ systemctl show -p SubState sshd | cut -d'=' -f2 running