Reputation: 26498
Is there a standard library for Bash? something like Java standard library.
Upvotes: 8
Views: 1389
Reputation: 929
You can try these 2 GitHub repoes, although they are not standard library, but it might be a good start.
xsh: a bash library framework.
xsh-lib/core: the core library of xsh.
Upvotes: 4
Reputation: 6001
No, I don't think there are 'standard libraries' such as STL. There are various files that you can include. For example:
/etc/init.d/functions
which intended for use in /etc/init.d
scripts (implementing services)/etc/sysconfig/network-scripts/network-functions
for use by scripts that are invoked when network interfaces (or whole network subsystem) change state./etc/profile.d
that are automatically included for use by interactive shellsBut I don't think that there are libraries implementing containers, iterators etc.
Upvotes: 4