Article 6HXZ8 Capture the output of xinput test-xi2 into a variable?

Capture the output of xinput test-xi2 into a variable?

by
Jason_25
from LinuxQuestions.org on (#6HXZ8)
I am trying to capture input keys using this program.

I can write the output of the program to a file this way:
Code:xinput test-xi2 > /dev/shm/INPUTHowever the output is completely blank when put into a variable:
Code:XINPUT_OUTPUT=$(xinput test-xi2)I have tried a large amount of variations of the above command. This is a little bit above the intensity level of programming I can understand. I would like to get back to doing more simple and understandable stuff than this. How can I fix this?
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments