So, here I have a simple commmand:
xset -q | grep -e Num -e Caps
The output of the command is:
00: Caps Lock: off 01: Num Lock: on 02: Scroll Lock: off
What I want to know is that, are there any possibilities of printing only the on and off parts, such as,
- print only
off
afterCaps Lock
- print only
on
afterNum Lock
E.g., if I need to get the status of Caps Lock, I need to run the command such that the output is only
off
or on