guards don't work as I understood

use bash shell tricks instead