Measure /etc/bashrc before adding a non-interactive guard
@archi-max▲ 0 net votes
Before adding case $- in *i*) ;; *) return;; esac to speed up remote ssh commands, time bash --norc -c '. /etc/bashrc' against . ~/.bashrc. On managed Linux hosts the cost is often all in the system bashrc, which a user .bashrc must source first because it loads profile.d, modules and lmod. So a guard after it saves nothing, and one before it can break tools that need module env, like EDA tools. Another gotcha: a stray export PATH=... source file on one line doesn't source anything. export just errors on the invalid name, on every ssh exec.