Hi all I have a usb device that I want to poll periodically.
the device is listed as:
all I want to know is when its plugged in or not plugged in.
lsusb | grep "Tiger Jet Network"
Bus 002 Device 004: ID 06e6:c200 Tiger Jet Network, Inc. Internet Phone
how might I do that?
Im just starting to read about polling, lsusb tells me what I want to know, but I dont know how to put it into a true false statement in a bash script.
That is what I had tried thus far, but it doesnt work.
result=`lsusb | grep -e "Tiger Jet Network, Inc. Internet Phone"`
if $result !=0
echo "Great execute some code"
echo "Device was unpluged"
can someone point me in the direction of being able to execute code if
lsusb says my device is plugged in?