Dash rc files for non-login non-interactive shells

1

Does dash have a non-interactive non-login rc file? I've read the man page, which recommends .profile for login shells and $ENV environment variable for interactive shells.

Is there anything that runs for non-interactive non-login shells, such as zsh's zshenv files, or bash's $BASH_ENV environment variable? Is there an equivalent file for Bourne shell too?


Best I can come up with so far (although not ideal at all as it requires me editing every single script) is to edit the shebang as follows:

#!/bin/sh /path/to/script

f

where /path/to/script contains

f() { echo "/path/to/script"; }

Nick Bull

Posted 2020-02-05T12:29:11.763

Reputation: 123

No answers