bash functional programming

Yes, I like using constructs like echo $(getlastentryfromlist(list, "bash sucks")) even in a bloody shell script.
It’s important to remember, that $() opens a subshell, so bash actually enforces a strict functional programming paradigma, because you cannot (at least not straight-forwardly) cause any side effects within the function.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.