itc-lab-06.docx - Instructor Arifa Awan Basic if Statements if a particular test is true then perform a given set of actions If it is not true then

itc-lab-06.docx - Instructor Arifa Awan Basic if Statements...

This preview shows page 1 - 4 out of 4 pages.

Instructor: Arifa Awan Basic if Statements: if a particular test is true, then perform a given set of actions. If it is not true then don't perform those actions. Anything between then and f (if backwards) will be executed only if the test (between the square brackets) is true. Nested If statements:
Image of page 1
If Elif Else: Sometimes we may have a series of conditions that may lead to different paths. Loops: while [ <some test> ] do <commands> done while_loop.sh 1. #!/bin/bash 2. # Basic while loop 3. 4. counter=1
Image of page 2
Image of page 3
Image of page 4

You've reached the end of your free preview.

Want to read all 4 pages?

  • Spring '16
  • n/a
  • It, #, loop, Bracket

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes