0 Computing Staff Asked: November 18, 20212021-11-18T08:58:38+00:00 2021-11-18T08:58:38+00:00In: Unix If [[$# -Eq 0]] ; Then In Unix 0 what is meanig of this Share Facebook 2 Answers Voted Oldest Recent Computing Staff 2021-11-18T08:59:09+00:00Added an answer on November 18, 2021 at 8:59 am $# is the number of command line arguments in a shell script. Here is a ksh example: http://www.computing.net/answers/un… 0 Reply Share Share Share on Facebook Share on Twitter Share on LinkedIn Share on WhatsApp Computing Staff 2021-11-18T09:00:31+00:00Added an answer on November 18, 2021 at 9:00 am $? is the return code form a previous command or function in unix, 0 is the standard return code for a successful completion if [$? -ne 0] The whole line means ‘if the previous return code was not equal to 0 ‘ …. It will then be followed by then statement # do something (optional) else (optional) statement # do something else fi # closure of the ‘if’ conditional 0 Reply Share Share Share on Facebook Share on Twitter Share on LinkedIn Share on WhatsApp
http://www.computing.net/answers/un…
$? is the return code form a previous command or function
in unix, 0 is the standard return code for a successful completion
if [$? -ne 0]
The whole line means
‘if the previous return code was not equal to 0 ‘ ….
It will then be followed by
then
statement # do something
(optional) else
(optional) statement # do something else
fi # closure of the ‘if’ conditional