( stra | 2012. 01. 21., szo – 14:54 )

1.) man dash:
 . file
  The commands in the specified file are read and executed by the shell.

3.) A SHELL változót exportálod a bash-ből, a dash meg nem állítja.
man bash:
 SHELL The full pathname to the shell is kept in this environment variable. If it is not set when the shell starts, bash assigns to it the full pathname of the current user's login shell.

 
 
"melyik shell is működteti a scriptet"
Ezt ugye célszerűen te határozod meg a script legelső sorában a hashbang után. Ha bash-t írsz, akkor bash lesz, ha dash-t, akkor dash-t, ha meg sh-t, akkor az, amelyikre az sh linkel. Annak nem sok értelmét látom, hogy sh-t kérsz, majd pedig ha dash-t kaptál, akkor a bash-specifikus kódot egy feltétellel kiiktatod. De ha más ötlet nincs, a readlink megteszi.

readlink /bin/sh