#!/bin/bash
#context1
(
    context="context1"
    echo "I'm in $context"
)
#end of context1

(#context2
    echo "I'm in $context"
    context=context2
    echo "I'm in $context"
)#end of context2