Skip to content

Commit b4b77ec

Browse files
Add exercises for individual shell tools and shell pipelines (#1)
Achieving these exercises meets all of the shell tools learning objectives of the first two sprints. --------- Co-authored-by: Alasdair Smith <[email protected]>
1 parent 9360927 commit b4b77ec

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+598
-0
lines changed

individual-shell-tools/README.md

Lines changed: 24 additions & 0 deletions

individual-shell-tools/awk/README.md

Lines changed: 9 additions & 0 deletions
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Ahmed London 1 10 4
2+
Basia London 22 9 6
3+
Mehmet Birmingham 3 12 17
4+
Leila London 1
5+
Piotr Glasgow 15 2 25 11 8
6+
Chandra Birmingham 12 6
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
# TODO: Write a command to output just the names of each player in `scores-table.txt`.
6+
# Your output should contain 6 lines, each with just one word on it.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
# TODO: Write a command to output the names of each player, as well as their city.
6+
# Your output should contain 6 lines, each with two words on it, separated by a space.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
# TODO: Write a command to output just the names of each player along with the score from their first attempt.
6+
# Your output should contain 6 lines, each with one word and one number on it.
7+
# The first line should be "Ahmed 1".
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
# TODO: Write a command to output just the names of each player in London along with the score from their last attempt.
6+
# Your output should contain 3 lines, each with one word and one number on it.
7+
# The first line should be "Ahmed 4".
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
# TODO: Write a command to output just the names of each player along with the number of times they've played the game.
6+
# Your output should contain 6 lines, each with one word and one number on it.
7+
# The first line should be "Ahmed 3".
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
# NOTE: This is a stretch exercise - it is optional.
6+
7+
# TODO: Write a command to output the total of adding together all players' first scores.
8+
# Your output should be exactly the number 54.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
# NOTE: This is a stretch exercise - it is optional.
6+
7+
# TODO: Write a command to output just the names of each player along with the total of adding all of that player's scores.
8+
# Your output should contain 6 lines, each with one word and one number on it.
9+
# The first line should be "Ahmed 15". The second line should be "Basia 37"

0 commit comments

Comments
 (0)