I'd be happy if this became a standard part of Bash.
But usually the main reason I'll resort to using Bash when I need to do branching logic, instead of writing the script in Python/Perl, is that I want to improve cross-compatibility (eg. work on old AIX, old Solaris). Right now, this add-on is less likely to be found than Perl, so... I'll use that instead.
However, this could be reimplemented with Bash functions and Perl one-liners, making it possible to put in a Bash include file, and packaged with any script that needs to be cross-compatible.
once I learned some Perl basics, I've started thinking of it as a meta-bash. good variables and conditionals with all the ease-of-use of shell pipelines.
Larry Wall was becoming increasingly frustrated with trying to use sh + sed + awk + friends to do his job as a sysadmin, so went and created Perl in an attempt to make everything simpler.
4
u/interiot Sep 06 '13 edited Sep 06 '13
I'd be happy if this became a standard part of Bash.
But usually the main reason I'll resort to using Bash when I need to do branching logic, instead of writing the script in Python/Perl, is that I want to improve cross-compatibility (eg. work on old AIX, old Solaris). Right now, this add-on is less likely to be found than Perl, so... I'll use that instead.
However, this could be reimplemented with Bash functions and Perl one-liners, making it possible to put in a Bash include file, and packaged with any script that needs to be cross-compatible.