#!/bin/bash statecon=$( echo "example" | grep x) #notify-send $statecon if [ "$statecon" != '' ]; then echo "ex" else echo "nx" fi