Hello ubuntu-community, i wanted to write a small own bluetooth connector. But i noticed a strange behavier when i scan for bluetooth devices. Here the code:
If I use it in the way above, it complains about:Code:#!/bin/bash ArrayCounter=0 while [ 0 -eq 0 ] do clear ScanResult=`hcitool scan` #ScanResult=`ls` if [ $ScanResult ] then echo ${ScanResult[0]} fi sleep 10 done
If i do the same with the command "ls" it workes quite expacted right. Does anyony realize a failure I made?Code:./bluetoothscan.sh: Zeile 10: [: Zu viele Argumente.
Thanks
mirrowwinger



Adv Reply



Bookmarks