error code

BASH is the default shell in GNU/Linux systems.  While writing BASH scripts sometimes it become necessary to take action based upon the success of previous command. So how do we do this.

First we need to understand that almost every command that is run once completed returns a exit code, 99% of commands just use 0 for success, 1 for failure. Without getting into other details, lets see how we can use this value.

Address

OpenSourceCook.in
"Natraj"  Bungalow,
Colony No.7,  Sr.No. 38.
(Lane Behind Sai Baba Mandir)
Kale Borate Nagar, Hadapsar,
Pune - 411028.
Get Directions