Unix/Linux Utility Commands
Unix/Linux Utility Commands subshell Unix subshell allows to scope the execution of command and the effect to a group of commands. For example changing directories or manipulating environment variables. Example: Change directory in subshell and execute command without switching directory in main shell ( cd ../ && pwd ) & ( cd ../../ && pwd ) & pwd Add new environment variable to a command ( export NEW_VARIABLE=123 && echo $NEW_VARIABLE ) && echo $NEW_VARIABLE Remove an environment variable to a command ( unset JAVA_HOME && echo $JAVA_HOME ) && echo $JAVA_HOME Change an environment variable to a command ( export HOME=$HOME/another && echo $HOME ) && echo $HOME The same can be achieved using -c option with sh or bash or zsh shell explicitly sh -c ' export HOME=$HOME/another && echo $HOME ' && echo $HOME bash -c ' export HOME=$HOME/another && echo $HOME ' && echo $HOM...