3 Practical Examples of Using Bash While and Until Loops

Veröffentlicht am: 05 Januar 2021
auf dem Kanal: Nick Janetakis
1,563
38

Ex: curling a site's HTTP status code response, monitoring a process & waiting for an S3 bucket.

Hit the subscribe button to receive more videos like this!

---

Timestamps:

0:00 -- What we're going to cover in this video
0:19 -- Using curl to get the HTTP status code of a response
1:30 -- Executing the curl command every 100ms in a while loop
2:27 -- Alternatively we can use while true and run commands in the loop
2:54 -- Using pgrep to see if unattended-upgrade is finished running
5:19 -- Using a while loop and pgrep to see if a process is done running
6:23 -- Using an until loop to check if an S3 bucket was created
8:44 -- wait-until is a generic version of an until loop with a timeout
9:35 -- Refactoring the S3 until loop to use the wait-until script
10:24 -- Recap

Code snippets:

https://nickjanetakis.com/blog/3-prac...

Reference links:

https://github.com/nickjj/wait-until

---

Follow along?

Personal Website: https://nickjanetakis.com
Twitter:   / nickjanetakis  


Auf dieser Seite können Sie das Online-Video 3 Practical Examples of Using Bash While and Until Loops mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Nick Janetakis 05 Januar 2021 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 1,563 Mal angesehen und es wurde von 38 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!