Re: split variable to insert date



I have a string variable, for ex:
BTID='test.testing.tested.txt'
I need to split this variable in 2 :

Hi Tom,

one nice way to do it in BASH is:

$ BTID='test.testing.tested.txt'
$ var1=${BTID%.*}
$ var2=${BTID##*.}
$ echo $var1
test.testing.tested
$ echo $var2
txt

BranoZ

.