View Single Post
Posts: 526 | Thanked: 99 times | Joined on Sep 2009
#48
I copied the code above and added one more section so it look slike this:

#!/bin/bash
a=`hcitool scan --class | awk '/BD Address/ {print substr($3,0,8)}' | grep '00:BD:3A\|00:BD:3B\|00:21:9E'`;
echo $a;
if [ "$a" ]
then
dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteDialog string:'Pizza! N900 here!' uint32:0 string:'OK'
fi;
and I get the following errors:
:not found N900finder.sh:line 2:

:not found N900finder.sh:line 3:
:not found N900finder.sh:line 7: syntax error: "fi" unexpected (expecting "then")

Please not this when I'm not expecting to find a device. perhaps thats why there is an error, could someone try my code please.
__________________
Christopher Stobbs

My Blog