If I enter the command:

set +m 

at the end of the .bashrc file, when I run the command:

echo $- 

the option m is missing as it should be, but...

If I enter the command:

{ sync & } 2> /dev/null 

and then I press enter again without entering any commands, although I removed the m option, the output still appears:

[1]+ Done sync 

and only when I rerun the command from the terminal:

set +m 

then the output is no longer shown. In other words, this command has effect only if executed from the terminal.

The question is:

How do I make it work when placed in .bashrc file?

Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy