|
Double Substitution variables in ksh
Hi
I have a variable whose value is like this
i=/test/test1/test2/myfile.cd.070505123457
i would like to have the value of myfile.cd stored into another variable
my attempt is
test=${i##*/} ;echo $test ##and i get
myfile.cd.070505123457
since what i wnat is myfile.cd i try this
test={{${i##*/}}##.} ;echo $test
and i get an error
Any idea how do i get what i want ?
regards
xiamin
|