On 14 September 2016 at 16:34, Todd Zullinger <tmz(a)pobox.com> wrote:
Thanks to all for the question and discussion. I enjoy diversions like
this. I nearly always pick up some new technique and interesting points of
view.
Yes, interesting to see these discussions ever so often. I wasn't
aware of the BASH_REMATCH trick Christopher posted in another recent
thread, two other nice Bash tricks I stumbled across recently, extglob
applies to subsitutions in parameter expansion and the base of a
number representation can be explicitly specified (preventing problems
when dealing with numbers potentially starting with 0 being
interpreted as octal), <
http://stackoverflow.com/a/11130324>. Not
great to get carried away with doing regexs and string manipulation in
bash, but sometimes it's being able to do something minor along those
lines that's the alternative to recasting things into a different
language.
--
imalone
http://ibmalone.blogspot.co.uk