Shell Programming Foundation-3

1. while loop

Syntax structure: while condition; do……; done

1) Infinite loop

While:

p>

do

  command

  done

2) Endless loop

While 1

Do

  command

  done

2. Check the system load every 30s, if the system load is greater than 10, send an email

Share pictures

1) View system load commands

w

Uptime

2) The delimiter specified by awk -F can be a string

3) Every 30s, sleep 30

3. continue

Extract out of this loop and continue the loop

Share a picture

4. break

Jump out of the loop and end the loop

Share a picture

5. exit

Exit the script directly

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 5518 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.