The intention of my script is to look for the usb printer and make sure the properties file is populated according to what's connected.
What I'm currently doing is:
ls -l /dev/usb | grep 'lp'
returns something like:
crw-rw---- 1 root lp 180, 1 Aug 5 11:32 lp1
crw-rw---- 1 root lp 180, 2 Aug 5 11:32 lp2
which I'd like to take the lp1 and lp2 values, and check my pos.properties file:
machine.printer=epson\:file,/dev/usb/lp2
machine.printer.3=epson\:file,/dev/usb/lp4
machine.printer.2=epson\:file,/dev/usb/lp1
for the strings '/dev/usb/lp1', '/dev/usb/lp2'. If both match, output 'OK, otherwise, output missing printer(s)