invocation-option
--norc
Suppress interactive nonlogin rc startup (and applicable remote rc loading). This noninteractive fixture does not test actual interactive rc suppression.
Formal Syntax & Structure
bash syntaxbash
bash --norc -c commandReturn Value
startup behavior
Suppress interactive nonlogin rc startup (and applicable remote rc loading). This noninteractive fixture does not test actual interactive rc suppression.
Working Example
Example Snippetbash
bash --noprofile --norc -c 'if [[ $- == *i* ]]; then printf "interactive\n"; else printf "noninteractive\n"; fi'