-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #7 - add missing practice for loops
- Loading branch information
Showing
2 changed files
with
36 additions
and
18 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 |
---|---|---|
@@ -1,9 +1,16 @@ | ||
## practice: scripting arrays | ||
## practice: scripting tests and loops | ||
|
||
1.In Bash Shell: | ||
1. Write a script that uses a `for` loop to count from 3 to 7. | ||
|
||
\* create variable named `my_arr` with empty value. | ||
2. Write a script that uses a `for` loop to count from 1 to 17000. | ||
|
||
\* add to my_arr values apple banana pineapple watermelon melon | ||
strawberry | ||
3. Write a script that uses a `while` loop to count from 3 to 7. | ||
|
||
4. Write a script that uses an `until` loop to count down from 8 to 4. | ||
|
||
5. Write a script that counts the number of files ending in `.txt` in | ||
the current directory. | ||
|
||
6. Wrap an `if` statement around the script so it is also correct when | ||
there are zero files ending in `.txt`. | ||
|
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