Hi,
What is the difference between using exit 0 and exit (0) in the shell script?
Thanks
Saurya
Hi,
What is the difference between using exit 0 and exit (0) in the shell script?
Thanks
Saurya
Hey There,
I'm not 100% sure on this one, but I believe that "exit 0" or "exit" with any number afterward, causes the shell to exit, while exit(0) is a shell built-in that causes program termination. Generally, your program is running in a subshell that will terminate when your script terminates, so, practically, there's not much of a difference.
Anyone else? Interesting question :)
, Mike
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.