using printenv in script sh in recovery TWRP return error execv failed : Exec format error for example just try this script

#!/sbin/sh

printenv | grep sdcard &gt;&gt; /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
printenv doesn't work but using env works well

so i changed my script like this

env &gt; /tmp/tong.txt


it works as expected