I’m running an efi application from the startup.nsh in efi shell. How can I get a value as return of the application to the shell and use it in the shell script?
Use the lasterror
variable, which contains the return value of the last program.
See more about scripting in chapter 4 of the UEFI Shell Specification (2.2).