For shell-scripting sorts of tasks, there’s also awk which I find a nice sort of halfway between bash and Perl.
Also, I’ve been using various lisps (elisp in emacs org-mode and Common Lisp) and they both can be written in ways that will probably last a long time.
Awk is a strange seeming suggestion, but I agree it's probably the next most universal, installed, stable over time option, and more readable than sh.
Using awk as a general purpose language means slightly bending it out of shape, by mostly ignoring the main section (which runs once per selected record of input) and writing your entire program in a big END{} section.
BUT
* It's installed everywhere and has been forever just like sh
* A 20 year old awk script from hpux or something, works in todays gawk, just like sh.
* Unlike sh, the language is more like a normal generic language than, making it more readable and less arcane for non-trivial jobs.
For example, bash has a handy substitute feature, in the form of a brace expansion. ${FOO//a/b}
Awk has an actual sub() or gsub() function.
A lot of things in bash require tricks essentially abusing various fancy brace expansions and messing with IFS to hijack the line parser into doing things there is no explicit command for, especially if you're avoiding external commands. IE you're not simply writing code that does what it says, you're running a bash interpreter in your head and manipulating strings so that when they are expanded and resolved, they mean something to the the parser and results in the parser doing something more useful. It's like your always writing code that writes code, instead of just writing code.
External dependencies is another whole point too. Shells main explicit job is to run other programs. You actually have to work pretty hard not to run an external binary by accident, ie you have know which commands are built in and which are executables. In awk or anything else, you have to go out of your way to exec() or system().
Also, I’ve been using various lisps (elisp in emacs org-mode and Common Lisp) and they both can be written in ways that will probably last a long time.