Skip to content

Commit 39f14ef

Browse files
committed
chore: Remove wrong files from branch
1 parent 4350f48 commit 39f14ef

18 files changed

Lines changed: 41 additions & 22 deletions

File tree

implement-shell-tools/cat/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ Your task is to implement your own version of `cat`.
66

77
It must act the same as `cat` would, if run from the directory containing this README.md file, for the following command lines:
88

9-
* `cat sample-files/1.txt`
10-
* `cat -n sample-files/1.txt`
11-
* `cat sample-files/*.txt`
12-
* `cat -n sample-files/*.txt`
13-
* `cat -b sample-files/3.txt`
9+
- `cat sample-files/1.txt`
10+
- `cat -n sample-files/1.txt`
11+
- `cat sample-files/*.txt`
12+
- `cat -n sample-files/*.txt`
13+
- `cat -b sample-files/3.txt`
1414

1515
Matching any additional behaviours or flags are optional stretch goals.
1616

implement-shell-tools/ls/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ Your task is to implement your own version of `ls`.
66

77
It must act the same as `ls` would, if run from the directory containing this README.md file, for the following command lines:
88

9-
* `ls -1`
10-
* `ls -1 sample-files`
11-
* `ls -1 -a sample-files`
9+
- `ls -1`
10+
- `ls -1 sample-files`
11+
- `ls -1 -a sample-files`
1212

1313
Matching any additional behaviours or flags are optional stretch goals.
1414

implement-shell-tools/wc/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ Your task is to implement your own version of `wc`.
66

77
It must act the same as `wc` would, if run from the directory containing this README.md file, for the following command lines:
88

9-
* `wc sample-files/*`
10-
* `wc -l sample-files/3.txt`
11-
* `wc -w sample-files/3.txt`
12-
* `wc -c sample-files/3.txt`
13-
* `wc -l sample-files/*`
9+
- `wc sample-files/*`
10+
- `wc -l sample-files/3.txt`
11+
- `wc -w sample-files/3.txt`
12+
- `wc -c sample-files/3.txt`
13+
- `wc -l sample-files/*`
1414

1515
Matching any additional behaviours or flags are optional stretch goals.
1616

individual-shell-tools/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ You should write all of your scripts assuming they're running inside the directo
1616
Some folders contain a README.md explaining more information, others do not.
1717

1818
We recommend approaching the tools in this order:
19+
1920
1. `ls`
2021
2. `cat`
2122
3. `wc`

individual-shell-tools/sed/script-01.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ set -euo pipefail
44

55
# TODO: Write a command to output input.txt with all occurrences of the letter `i` replaced with `I`.
66
# The output should contain 11 lines.
7-
# The first line of the output should be: "ThIs Is a sample fIle for experImentIng wIth sed.".
7+
# The first line of the output should be: "ThIs Is a sample fIle for experImentIng with sed.".

jq/person.json

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
{
2-
"name": "Selma",
3-
"profession": "Software Engineer",
4-
"address": [
5-
"35 Fashion Street",
6-
"London",
7-
"E1 6PX"
8-
]
2+
"name": "Selma",
3+
"profession": "Software Engineer",
4+
"address": ["35 Fashion Street", "London", "E1 6PX"]
95
}

jq/scores.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
1-
[{"name": "Ahmed", "city": "London", "scores": [1, 10, 4]}, {"name": "Basia", "city": "London", "scores": [22, 9, 6]}, {"name": "Mehmet", "city": "Birmingham", "scores": [3, 12, 17]}, {"name": "Leila", "city": "London", "scores": [1]}, {"name": "Piotr", "city": "Glasgow", "scores": [15, 2, 25, 11, 8]}, {"name": "Chandra", "city": "Birmingham", "scores": [12, 6]}]
1+
[
2+
{ "name": "Ahmed", "city": "London", "scores": [1, 10, 4] },
3+
{ "name": "Basia", "city": "London", "scores": [22, 9, 6] },
4+
{ "name": "Mehmet", "city": "Birmingham", "scores": [3, 12, 17] },
5+
{ "name": "Leila", "city": "London", "scores": [1] },
6+
{ "name": "Piotr", "city": "Glasgow", "scores": [15, 2, 25, 11, 8] },
7+
{ "name": "Chandra", "city": "Birmingham", "scores": [12, 6] }
8+
]

jq/script-01.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ set -euo pipefail
55
# The input for this script is the person.json file.
66
# TODO: Write a command to output the name of the person.
77
# Your output should be exactly the string "Selma", but should not contain any quote characters.
8+
# jq -r '.name' < person.json //using redirection to the input
9+
jq -r '.name' person.json

jq/script-02.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ set -euo pipefail
55
# The input for this script is the person.json file.
66
# TODO: Write a command to output the address of the person, all on one line, with a comma between each line.
77
# Your output should be exactly the string "35 Fashion Street, London, E1 6PX", but should not contain any quote characters.
8+
# jq -jr '.address | join(", "), "\n"' < ./person.json
9+
jq -r '.address | join(", ")' person.json

jq/script-03.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ set -euo pipefail
55
# The input for this script is the person.json file.
66
# TODO: Write a command to output the name of the person, then a comma, then their profession.
77
# Your output should be exactly the string "Selma, Software Engineer", but should not contain any quote characters.
8+
jq -r '.name + ", " + .profession' person.json

0 commit comments

Comments
 (0)