On 2024-07-10 16:00:48 +0200, Nicolas George wrote: > Greg Wooledge (12024-07-10): > > You could -- but if you do so, you should definitely surround it with > > a check for stdin being a terminal (test -t 0 or equivalent). > > Does bash execute .bashrc when it is not interactive?
Yes, it may execute it. From the bash(1) man page: If bash determines it is being run non-interactively in this fashion, it reads and executes commands from /etc/bash.bashrc and ~/.bashrc, if these files exist and are readable. -- Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)