Bash Shell “onecmd” Option Usage Purpose

I read on man page, but I don’t understand the purpose of bash’s onecmd option. If I use the set -o onecmd command, the shell immediately exits. My expectation is for it to wait for me to enter one more command before exiting, but this does not happen.

So is this option just like the exit command?

Why does bash provide this option?

Can someone give me an example of how to properly use this option?

Go to Source
Author: testter