Linux Today: Linux News On Internet Time.

Bash Parameter Expansion

Oct 03, 2008, 01:32 (0 Talkback[s])
(Other stories by Mitch Frazier)

"There are also expansions for removing prefixes and suffixes. The form ${VAR#pattern} removes any prefix from the expanded value that matches the pattern. The removed prefix is the shortest matching prefix, if you use double pound-signs/hash-marks the longest matching prefix is removed. Similarily, the form ${VAR%pattern} removes a matching suffix..."

Complete Story

Related Stories: