I’m dealing with a large collection of bash-scripts, and need to eliminate the use of an old variable, which makes no sense — and hasn’t made sense for the last 5 years or so.
The variable used to denote a path, and we’re currently setting it to /var/empty
. Is there a way to declare it in such a fashion, that any references to it would cause bash to print a warning — but not fail with an error? Sort of like the __attribute__ ((deprecated))
feature of the modern C/C++ compilers?
(Many of our scripts already begin with set -eu
.)