View Single Post
nicolai's Avatar
Posts: 1,637 | Thanked: 4,424 times | Joined on Apr 2009 @ Germany
#57
To much quotes (")
awk -F "\"" '/at/ {print $}'
instead of
awk -F "\"" "'/at/ {print $}'
Code:
#!/bin/sh
if [ dbus-send --system --type=method_call --dest=org.bluez $(dbus-send --system --print-reply --dest=org.bluez / org.bluez.manager.ListAdapter |  awk -F "\"" '/at/ {print $}') org.bluez.Adapter.SetProperty String: Powerd variant:boolean:true | echo "" ]; then
if [ dbus-send --system --type=method_call --dest=org.bluez $(dbus-send --system --print-reply --dest=org.bluez / org.bluez.manager.ListAdapter |  awk -F "\"" '/at/ {print $}') org.bluez.Adapter.SetProperty String: Powerd variant:boolean:false | echo ""
else
if [ dbus-send --system --type=method_call --dest=org.bluez $(dbus-send --system --print-reply --dest=org.bluez / org.bluez.manager.ListAdapter |  awk -F "\"" '/at/ {print $}') org.bluez.Adapter.SetProperty String: Powerd variant:boolean:true | echo ""
fi