From pseudo terminal /dev/pts/id trying to export key=value from child script, so exported variables has to be passed some how to parent, if possible? echoing cmd > /proc/$$/fd/0 doesn't execute cmd, only view command in shell terminal emulator, and of course using $(cmd) instead of cmd executes in subshell, and export doesn't add variables to parent process.EDIT (1) assuming all the work should be done in the child side.(2) asked in comments, what i'm trying to achieve? that is a general question, and i'm trying to use the positive answer to pass variables from script executed by parent shell so that user can benefit from added variables without any further work, i.e if script installing application, application should be added in parent shell path.
Is it possible to pass environment variables from child to parent in user space?
process;environment variables
No, it's not possible.Environment variables can only be passed from parent to child (as part of environment export/inheritance), not the other way around.