bashparameter-expansion

Bash parameter expansion: get entire remainder of a string after an offset


How can I avoid rest=${burger:1:99999999999999}, is there something that can replace the 9999999999 while still getting the remainder of the string burger ?


Solution

  • In substring=${var:offset:len}, the :len can be elided completely.

    So just make it:

    rest=${burger:1}