From the course: Learning Bash Scripting
Unlock this course with a free trial
Join today to access over 24,500 courses taught by industry experts.
Challenge: Build a script using control structures - Bash Tutorial
From the course: Learning Bash Scripting
Challenge: Build a script using control structures
(pleasant electronic music) - [Instructor] Let's take a moment to practice some of what we've learned so far. Your challenge is to make a script that uses control structures and generates predetermined or randomized replies. It could be a script that displays a motivational quote, a dice roll or card draw, a fortune, or just about anything else that can display a result based on input or some other condition. This should take you about 20 minutes, and when you're ready, come back, and I'll show you what I built in response to this challenge. Good luck.
Contents
-
-
-
-
-
Conditional statements with the "if" keyword4m 17s
-
(Locked)
Working with "while" and "until" loops3m 57s
-
(Locked)
Introducing "for" loops4m 22s
-
(Locked)
Selecting behavior using "case"2m 11s
-
(Locked)
Using functions6m 17s
-
(Locked)
Reading and writing text files3m 25s
-
(Locked)
Challenge: Build a script using control structures33s
-
(Locked)
Solution: Build a script using control structures1m 18s
-
-
-
-