2 ms·
> So literally every ‘if’, ‘echo’ and ‘for’ (etc) has its own process ID in Linux/UNIX echo: yes if, for: no Control flow statements do not execute in subshe
by PaulDavisThe1st 4y ago
> So literally every ‘if’, ‘echo’ and ‘for’ (etc) has its own process ID in Linux/UNIX
echo: yes
if, for: no
Control flow statements do not execute in subshells (processes) unless explicitly told to do so.
You may be thinking of test(1) aka [
if [ a == b ] ; then ....
which was originally written:
if test a == b ; then
test(1) is its own executable. But [ is a builtin command and does not execute in a separate process.