fix(user/bkdatev):Make compatible with Bash 3.2.57
authorSteven Baltakatei Sandoval <baltakatei@gmail.com>
Tue, 23 May 2023 01:39:57 +0000 (01:39 +0000)
committerSteven Baltakatei Sandoval <baltakatei@gmail.com>
Tue, 23 May 2023 01:39:57 +0000 (01:39 +0000)
commitbe603b6fc18aaa59a35f668bc5eccd18b1ce41a0
treec3abdab712dc9c0257956b4f9cf3d5db6506fa2d
parentb29fc43b4fc448c2b198b02dd560d67dac61de6a
fix(user/bkdatev):Make compatible with Bash 3.2.57

- Note: In Bash 5.1, a negative length argument in a parameter
  substitution (i.e. the `$len` in `${myVar:$start_idx:$len}`) causes
  the last characters of the $myVar string to be truncated which is
  convenient in various applications. However, a negative length in Bash
  3.2.57 (a macOS machine I happen to have) throws an error; for
  compatibility, I've instead added an additional arithemetical
  operation to calculate the positive length that corresponds to a
  truncation by 2 of the total string length.
user/bkdatev [changed mode: 0755->0644]