Computing Staff
  • 0

If [[$# -Eq 0]] ; Then In Unix

  • 0

what is meanig of this

Share

2 Answers

  1. $? 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