Script termination without pressing Enter key[nohup]

I have a script in which we have used nohup. Once script is executed it will be terminated only when enter key is pressed. I want the script to be terminated without pressing enter key

nohup imqbrokerd -name user_id port 2>1 1>$home_`date` &

I am a newbie to shell, Kindly please help

If thinking of setting up a broker daemon, you should refer to the corresponding installation guide of the Editors. (The link provided is just an example, it may not correspond to your version or your plateform, get the right install guide or the right documentation that matches yours).

1 Like

Try instead:

nohup imqbrokerd -name user_id port  1>"$home_`date`" 2>&1 &

If the problem persists, try:

nohup imqbrokerd -name user_id port  </dev/null 1>"$home_`date`" 2>&1 &
1 Like

How has the shell variable home_ been defined?