|
2011-11-20
, 14:07
|
|
Posts: 518 |
Thanked: 334 times |
Joined on Mar 2010
@ italy
|
#12
|
|
2011-11-22
, 10:00
|
Posts: 99 |
Thanked: 65 times |
Joined on Jan 2008
@ Finland
|
#13
|
ok maybe the script works, how can i compare functions with if then else?
i wrote
if 1rstcheck then
echo "1rst check exists" else
2ndcheck then
echo "2nd check exists" else
3rdcheck then
echo "3rd check exists"
but it doesnt work...
if condition1; then foo1 elif condition2; then foo2 else foox fi
#! /bin/sh set -e sub phone_is_charging() { lshal -u /org/freedesktop/Hal/devices/bme | grep -iq "maemo.rechargeable.charging_status = 'on'" } sub set_profile_and_foo() { foo $1 } # main logic starts here if phone_is_charging; then set_profile_and_foo General else set_profile_and_foo Silent fi
#! /bin/bash sub foo() { local x="$1" echo $x } x=xyzzy foo bar echo $x
foo="$(cat "$filename")"
test "$variable" = "yes" test "x$variable" = "xyes" # if you're paranoid
The Following User Says Thank You to wnd For This Useful Post: | ||
i can use this to compare
check='cat /home/user/.profiled/current'
if [ $profilo = $check ]: then
......
i did a long work i could cut the way and the time
*** 4 user Agents in the Status Menu ***
Mosquito's Hunter
Exential Suite
Camera UI pack (icons) for the CSSU Update
Date Time Syncronizer
PREENV and PREENV HD without switching between Libsdlpre
Last edited by santiago; 2011-11-20 at 13:50.