In "normal" android you start up a Terminal emulator or do "adb shell" and then from there you can defining a function by:
function name
{
#code
}
name #runs "name"
But by using adb shell over TWRP it says the command "function" cannot be found. the command "whereis function" and "which function" provides no outputs and leaves me baffled. Any idea how to define function in TWRP, preferably over adb shell