-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env bash | ||
#This script prints "Best School" 10 times | ||
|
||
for _ in {1..10}; | ||
do | ||
echo "Best School" | ||
done |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env bash | ||
#This script prints "Best School" 10 times | ||
|
||
n=0 | ||
while [ $n -lt 10 ]; | ||
do | ||
echo "Best School" | ||
((n++)) | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env bash | ||
#This script prints "Best School" 10 times | ||
|
||
n=0 | ||
until [ $n == 10 ]; | ||
do | ||
echo "Best School" | ||
((n++)) | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env bash | ||
#displays Best School 10 times, but for the 9th iteration, displays Best School and then Hi on a new line | ||
|
||
n=0 | ||
while [ $n -lt 10 ]; | ||
do | ||
echo "Best School" | ||
if [ $n == 8 ]; | ||
then | ||
echo "Hi" | ||
fi | ||
((n++)) | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env bash | ||
# script that loops from 1 to 10 | ||
n=1 | ||
|
||
while [ $n -le 10 ]; | ||
do | ||
if [ $n == 4 ]; then | ||
echo "bad luck" | ||
elif [ $n == 8 ]; then | ||
echo "good luck" | ||
else | ||
echo "Best School" | ||
fi; | ||
((n++)) | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env bash | ||
# script that loops from 1 to 10 | ||
n=1 | ||
|
||
while [ $n -le 20 ]; | ||
do | ||
case $n in | ||
4) echo "bad luck from China" | ||
;; | ||
9) echo "bad luck from Japan" | ||
;; | ||
17) echo "bad luck from Italy" | ||
;; | ||
*) echo $n | ||
;; | ||
esac | ||
((n++)) | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bash | ||
# script that displays the time for 12 hours and 59 minutes | ||
|
||
sec=0 | ||
hr=0 | ||
|
||
while [ $hr -le 12 ]; | ||
do | ||
sec=0 | ||
echo "Hour: $hr" | ||
while [ $sec -le 59 ]; | ||
do | ||
echo $sec | ||
((sec++)) | ||
done | ||
((hr++)) | ||
done |
Empty file.
Empty file.