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

Time:01-16

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 ?

CodePudding user response:

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

So just make it:

rest=${burger:1}
  •  Tags:  
  • Related