Quantcast
Channel: Is $() a subshell? - Unix & Linux Stack Exchange
Browsing all 4 articles
Browse latest View live

Answer by Iskustvo for Is $() a subshell?

Yes, ( commands... ) is a bash subshell that will execute commands... in another process. The only difference when you have $( commands... ) is that this part of code will after execution of...

View Article



Answer by Gilles for Is $() a subshell?

$(…) is a subshell by definition: it's a copy of the shell runtime state¹, and changes to the state made in the subshell have no impact on the parent. A subshell is typically implemented by forking a...

View Article

Answer by Ignacio Vazquez-Abrams for Is $() a subshell?

From the bash(1) man page in bash version 4.4, "EXPANSION" section, "Command Substitution" subsection: Bash performs the expansion by executing command in a subshell environment [...]

View Article

Is $() a subshell?

I understand the subshell syntax to be (<commands...>), is $() just a subshell that you can retrieve variable values from? Note: This applies to bash 4.4 based on different wording in their...

View Article
Browsing all 4 articles
Browse latest View live




Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>