for example just try this script
#!/sbin/sh
printenv | grep sdcard >> /tmp/tong.txt
in recovery.log i've
run_program: execv failed: Exec format error
run_program: child exited with status 1
I think it's about printenv but i don't understand what is wrong.
Using printenv in a terminal emulator works but not in my script sh