I would like to generate some exit code, say 20.
But if I do on shell:
$ exit 20
the shell is closed (X-Windows case) or I am logged out (text console case). Of course, inside .sh scripts, this command works fine.
I have tested with no success:
$ return 20
bash: return: can only `return' from a function or sourced script
$ break 20
bash: break: only meaningful in a `for', `while', or `until' loop
Is there any way to assign a value to $?
variable?