_SHELL is the current shell number. _SHELL will return 0 for a primary shell, or 1 (or higher) for a TCC-RT shell instance started by a parent TCC-RT process (either directly or via a pipe).

 

Note that the concept of shell numbers is now mostly obsolete in Windows.