I have never seen this anywhere in my search I am making a script to see if I can send a string variable to notify-send so far
$MESSAGE='Hello world!'
notify-send "`$MESSAGE`" -t 1
will trow
Hello command not found
and
notify-send $MESSAGE -t 1
sends a too many argument error
so is there a way to do that?
Try this:
We declare a variable using
NAME=VALUEin bash. There's no$sign before the variable name. Then you enclose variable value obtained by using$character using". The`character is used as a command substitution, same as$(...).When you write"`$MESSAGE`", you tell you bash to execute command namedHellowith argumentworld!. As such command does not exists, your bash returnsHello command not found.