Site Tools


Table of Contents

# $EPIC: shiftbrace.txt,v 1.3 2008/11/30 19:14:38 jnelson Exp $




If the value of the named variable begins with a braced expression (surrounded by curly braces), the expression will be removed from that variable and the inside of the expression will be returned.

If the value of the named variable does not begin with a braced expression, then the variable is not changed and the empty value is returned.

Extra spaces may be important! This may change in the future.


/assign qwer {asdf zxcv} {zxcv asdf qwer} one two
/eval echo $shiftbrace(qwer)  =>  asdf zxcv
/eval echo $shiftbrace(qwer)  =>  zxcv asdf qwer
/eval echo $shiftbrace(qwer)  =>  (the empty string)
shiftbrace.txt · Last modified: 2008/11/30 19:14 by