![]() |
2012-02-05
, 13:53
|
|
Posts: 165 |
Thanked: 18 times |
Joined on Jun 2010
|
#52
|
How did you create the file (what operating system, windows or linux?)
http://en.wikipedia.org/wiki/Newline#Common_problems
![]() |
2012-02-05
, 14:00
|
|
Posts: 1,637 |
Thanked: 4,424 times |
Joined on Apr 2009
@ Germany
|
#53
|
The Following User Says Thank You to nicolai For This Useful Post: | ||
![]() |
2012-02-05
, 14:18
|
|
Posts: 165 |
Thanked: 18 times |
Joined on Jun 2010
|
#54
|
![]() |
2012-02-05
, 14:27
|
|
Posts: 165 |
Thanked: 18 times |
Joined on Jun 2010
|
#55
|
I can not upload simple shell scripts.
I had to compress it with gz.
Upload the file to your device and in
xterm enter
gzip -d change_brightness.sh.gz
The Following User Says Thank You to moudy91 For This Useful Post: | ||
![]() |
2012-02-07
, 07:23
|
|
Posts: 165 |
Thanked: 18 times |
Joined on Jun 2010
|
#56
|
I can not upload simple shell scripts.
I had to compress it with gz.
Upload the file to your device and in
xterm enter
gzip -d change_brightness.sh.gz
#!/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
![]() |
2012-02-07
, 09:43
|
|
Posts: 1,637 |
Thanked: 4,424 times |
Joined on Apr 2009
@ Germany
|
#57
|
#!/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
![]() |
2012-02-07
, 10:52
|
|
Posts: 165 |
Thanked: 18 times |
Joined on Jun 2010
|
#58
|
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
http://en.wikipedia.org/wiki/Newline#Common_problems
my contributions:
Desktop Clock Widget|Calendar Home Widget|Lens Cover Reminder|ConnectNow|Scout|App Search Widget|ProfilesX|
Desktop-Switcher|SMS-Messageblocker
-Donate-