3 ms·
And it will certainly improve the debuggability of such code. The approaches are great, it would be nice to bundle these tools into a single shell script for ea
by ktpsns 6y ago
And it will certainly improve the debuggability of such code. The approaches are great, it would be nice to bundle these tools into a single shell script for easier usage. Or is there any reason why foreach() needs to be a file?
- amicofragile 6y agoNo, you can bundle functions like foreach, map, reduce and similar in your own `functional-bash.sh`, exporting them with `export -f`; so, if you include something like `. ~/bin/functional-bash.sh` in your `.bashrc` (or similar) file, these basic functions are available in all your scripts! I plan to write a blog post about this topic within a few days ;-)