Hi!
I'm trying to read evtest output into variable for next usage (parsing).
Code:
#!/bin/bash
while true; do
EVENT=`evtest /dev/input/event0 | grep "LEFT"`
echo "$EVENT"
done
Code hangs on EVENT=`evtest /dev/input/event0 | grep "LEFT"` command.
if I print the output immediately it works and shows output:
Code:
#!/bin/bash
while true; do
echo evtest /dev/input/event0 | grep "LEFT"
done
How can I get it into variable?
Thanks in advance.