User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

shiftbrace [2008/11/30 19:14] (current)
Line 1: Line 1:
 +# $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 (external edit)