How to print apparently hidden environment variables?
The set
command shows all variables (and functions), not just the exported ones, so
set | grep EUID
will show you the desired value. This command should show all the non-exported variables:
comm -23 <(set | grep '^[^=[:space:]]\+=' | sort) <(env | sort)