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?
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?