Multiple choice technology operating systems

How do you close a if block in unix shellscript?

  1. end if

  2. }

  3. fi

  4. #

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In Unix shell scripting, an if block is closed with 'fi', which is 'if' spelled backwards. This syntax is unique to shell scripts. Options A ('end if') is not valid shell syntax, option B ('}') is used for code blocks in other languages, and option D ('#') starts a comment.