#### Remove leading 0's This uses extended globbing. More of that [http://mywiki.wooledge.org/glob#extglob here]. Also see BashExtendedGlobs. To enable this: ```plaintext shopt -s extglob ``` and then ```plaintext A="00123" B=${A##+(0)} # B := 123 ``` Here the `##` means remove longest match, and `+(0)` means match 1 or more 0's. Related example: ```plaintext A="abababacde" B="${A##+(ab)}" # B := acde ```