'0' is false and '1' is true typically but it is different in Linux
Hi All
I'm happy to hear and get a request from one of my regular blog watcher that he asked me to post Linux related stuffs regularly. I'll try my level best.
In most of the programming Languages and scripting languages numeric 0 refers false and 1 refers true but
in linux it is different slightly / opposite in a scenario. Come Let's see that in following illustration.
we're going to use the following
- test
- This command/utility is used to test some conditions. Here we're going to use it for checking file exists or not
- $?
- It returns the output of last run above command
As per the below execution, If file exists output is 0 otherwise 1 (i.e 0=true and 1=false)
we learnt a small different thing. will meet in next post.
Comments
Post a Comment