|
From: | Tycho Kirchner |
Subject: | bash -i -c // check from bashrc if within startup or execution |
Date: | Wed, 27 Oct 2021 14:35:17 +0200 |
Hi,When bash is invoked with bash -i -c ':' it sources ~/.bashrc before the processing of the BASH_EXECUTION_STRING begins. I kindly wanted to ask for a robust way to discriminate the sourcing of ~/.bashrc performed during initialization from a potential sourcing during the actual command execution. More specifically, how to tell from bashrc whether it was sourced using
bash -i -c ':' or bash --rcfile /dev/null -i -c 'source ~/.bashrc' Thanks in advance Kind regards Tycho Kirchner
[Prev in Thread] | Current Thread | [Next in Thread] |