eval does not solve this problem, you need the "run-in-background" symbol, i.e. '&' (without quotes).
Rewrite your string as
#eval $COMMAND $COMMAND &
Depending on what you really have in $ COMMAND, you may need to return eval .
In addition, depending on your need, starting the process in the background will generate some jobs output, i.e.
[1] 10079
To the std error of your console. You need additional syntax to redirect it to / dev / null. Here is an example:
COMMAND="sleep 10" { $COMMAND & ; } 1>/dev/null 2>&1
Using a process group ( { .... ; } should not cause any problems, but it can be.
Ihth
shellter
source share