I'm new here and trying to take the android from an other angle...
i've correctly(i hope) installed the sdk and succeed in getting into adb shell...

I know about shell scripting but not unix style, and want to write a script... and i'm being silly or find the android behave different then all seen examples. So I need a push, or referel to related information.
to keep environment simple I execute on the sdcard #sh testfile (avoiding copy cmod .... for now)

A) SYSTEM Variables , there are none ??? echo $OSTYPE remain blank, so Im considering things badly or implementation is different
B) Subroutine functions
test() {echo blabla} gets executed without calling (at the definition location ???!?? just as if it is not a callable thing

Problems a and b indicate to me my approach is bad and I need a kick in the right direction by someone who knows