Can anyone please suggest me that how can I parse the below command output and store particular value in a variable.
sestatus
This is the output of that command
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: enforcing
Mode from config file: enforcing
Policy version: 24
Policy from config file: targeted
Here I want to store "enforcing" of Current mode: in a variable.
Can anyone please suggest me.
Thanks In Advance.