View Single Post
Lord Awesome's Avatar
Posts: 47 | Thanked: 24 times | Joined on Nov 2009 @ Bolton, United Kingdom
#47
Originally Posted by robota View Post
OK, without modification it doesn't compain?
I had the same issue as above, so I trimmed the whitespace and took the line breaks out and it works.

Code:
#!/bin/bash
a=`hcitool scan --class | awk '/BD Address/ {print substr($3,0,8)}' | grep '00:BD:3A\|00:BD:3B'`;
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;