From 7a9badecdecdb5270f904c9ccc0505a7fdc966ed Mon Sep 17 00:00:00 2001 From: Sisu860 Date: Sat, 14 Nov 2026 22:31:58 +0000 Subject: [PATCH 01/31] Complete ls script-01 --- individual-shell-tools/ls/script-01.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/individual-shell-tools/ls/script-01.sh b/individual-shell-tools/ls/script-01.sh index 241b62f5e..081f2c7c2 100755 --- a/individual-shell-tools/ls/script-01.sh +++ b/individual-shell-tools/ls/script-01.sh @@ -13,3 +13,4 @@ fi # TODO: Write a command to list the files and folders in this directory. # The output should be a list of names including child-directory, script-01.sh, script-02.sh, and more. +ls \ No newline at end of file From 6d838aba4b6099bab1db604b9c48886722c8bd18 Mon Sep 17 00:00:00 2001 From: Sisu860 Date: Sun, 15 Nov 2026 01:45:08 +0000 Subject: [PATCH 02/31] Complete ls script-02 --- individual-shell-tools/ls/script-02.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/individual-shell-tools/ls/script-02.sh b/individual-shell-tools/ls/script-02.sh index d0a5a10f4..d37175729 100755 --- a/individual-shell-tools/ls/script-02.sh +++ b/individual-shell-tools/ls/script-02.sh @@ -4,3 +4,4 @@ set -euo pipefail # TODO: Write a command which lists all of the files in the directory named child-directory. # The output should be a list of names: helper-1.txt, helper-2.txt, helper-3.txt. +ls child-directory From 0fb85a74d241e7896870d1829b7bdb45f1ad054f Mon Sep 17 00:00:00 2001 From: Sisu860 Date: Sun, 15 Nov 2026 01:58:37 +0000 Subject: [PATCH 03/31] Complete ls script-03 --- individual-shell-tools/ls/script-03.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/individual-shell-tools/ls/script-03.sh b/individual-shell-tools/ls/script-03.sh index 781216d21..7a1a1d315 100755 --- a/individual-shell-tools/ls/script-03.sh +++ b/individual-shell-tools/ls/script-03.sh @@ -5,3 +5,4 @@ set -euo pipefail # TODO: Write a command which _recursively_ lists all of the files and folders in this directory _and_ all of the files inside those folders. # The output should be a list of names including: child-directory, script-01.sh, helper-1.txt (and more). # The formatting of the output doesn't matter. +ls -R \ No newline at end of file From f165976bde807f4800c717cd685dd0fa7aa44992 Mon Sep 17 00:00:00 2001 From: Sisu860 Date: Sun, 15 Nov 2026 02:09:59 +0000 Subject: [PATCH 04/31] Complete ls script-04 --- individual-shell-tools/ls/script-04.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/individual-shell-tools/ls/script-04.sh b/individual-shell-tools/ls/script-04.sh index 72f3817b3..08152322f 100755 --- a/individual-shell-tools/ls/script-04.sh +++ b/individual-shell-tools/ls/script-04.sh @@ -15,9 +15,10 @@ echo "First exercise (sorted newest to oldest):" # TODO: Write a command which lists the files in the child-directory directory, one per line, sorted so that the most recently modified file is first. # The output should be a list of names in this order, one per line: helper-3.txt, helper-1.txt, helper-2.txt. - +ls -1t child-directory echo "Second exercise (sorted oldest to newest):" # TODO: Write a command which does the same as above, but sorted in the opposite order (oldest first). # The output should be a list of names in this order, one per line: helper-2.txt, helper-1.txt, helper-3.txt. +ls -1tr child-directory \ No newline at end of file From ecfc9fa3964d01b7f122dc5d93fb9204faeb0f47 Mon Sep 17 00:00:00 2001 From: Sisu860 Date: Sun, 15 Nov 2026 02:26:02 +0000 Subject: [PATCH 05/31] Complete cat script-01 --- individual-shell-tools/cat/script-01.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/individual-shell-tools/cat/script-01.sh b/individual-shell-tools/cat/script-01.sh index c85053e0f..94ceeb4fe 100755 --- a/individual-shell-tools/cat/script-01.sh +++ b/individual-shell-tools/cat/script-01.sh @@ -4,3 +4,4 @@ set -euo pipefail # TODO: Write a command to output the contents of the helper-1.txt file inside the helper-files directory to the terminal. # The output of this command should be "Once upon a time...". +cat ../helper-files/helper-1.txt \ No newline at end of file From 96ea0482b4cd37421b8c6e04a6a72d2f571d65fb Mon Sep 17 00:00:00 2001 From: Sisu860 Date: Tue, 17 Nov 2026 21:36:38 +0000 Subject: [PATCH 06/31] Complete cat script-02 --- individual-shell-tools/cat/script-02.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/individual-shell-tools/cat/script-02.sh b/individual-shell-tools/cat/script-02.sh index 01bbd5eab..4a045acf0 100755 --- a/individual-shell-tools/cat/script-02.sh +++ b/individual-shell-tools/cat/script-02.sh @@ -11,3 +11,4 @@ set -euo pipefail # It looked delicious. # I was tempted to take a bite of it. # But this seemed like a bad idea... +cat ../helper-files/* \ No newline at end of file From 7ae8463f72525bf077319bde713c2b1a8fb5279d Mon Sep 17 00:00:00 2001 From: Sisu860 Date: Wed, 18 Nov 2026 12:15:46 +0000 Subject: [PATCH 07/31] Complete cat script-03 --- individual-shell-tools/cat/script-03.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/individual-shell-tools/cat/script-03.sh b/individual-shell-tools/cat/script-03.sh index 37573b0c1..e4c6d99f6 100755 --- a/individual-shell-tools/cat/script-03.sh +++ b/individual-shell-tools/cat/script-03.sh @@ -9,3 +9,4 @@ set -euo pipefail # 1 It looked delicious. # 2 I was tempted to take a bite of it. # 3 But this seemed like a bad idea... +cat -n ../helper-files/helper-3.txt \ No newline at end of file From 131992355b73cd85dfc84c1061bbf8cd3843404a Mon Sep 17 00:00:00 2001 From: Sisu860 Date: Wed, 18 Nov 2026 12:30:24 +0000 Subject: [PATCH 08/31] Complete cat script-04 --- individual-shell-tools/cat/script-04-stretch.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/individual-shell-tools/cat/script-04-stretch.sh b/individual-shell-tools/cat/script-04-stretch.sh index 00fe3c48b..f71b48fe7 100755 --- a/individual-shell-tools/cat/script-04-stretch.sh +++ b/individual-shell-tools/cat/script-04-stretch.sh @@ -13,3 +13,4 @@ set -euo pipefail # 3 It looked delicious. # 4 I was tempted to take a bite of it. # 5 But this seemed like a bad idea... +cat -n ../helper-files/* \ No newline at end of file From e3fdfd98ce83bd2218e256d09a82efd5d983ffe6 Mon Sep 17 00:00:00 2001 From: Sisu860 Date: Wed, 18 Nov 2026 12:53:02 +0000 Subject: [PATCH 09/31] Complete wc script-01 --- individual-shell-tools/wc/script-01.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/individual-shell-tools/wc/script-01.sh b/individual-shell-tools/wc/script-01.sh index c9dd6e5df..2b1e87d63 100755 --- a/individual-shell-tools/wc/script-01.sh +++ b/individual-shell-tools/wc/script-01.sh @@ -4,3 +4,4 @@ set -euo pipefail # TODO: Write a command to output the number of words in the file helper-files/helper-3.txt. # The output should include the number 19. The output should not include the number 92. +wc -w ../helper-files/helper-3.txt \ No newline at end of file From 919e3c7110482e27f57a64d5b6864a9ed81efe99 Mon Sep 17 00:00:00 2001 From: Sisu860 Date: Wed, 18 Nov 2026 12:55:18 +0000 Subject: [PATCH 10/31] Complete wc script-02 --- individual-shell-tools/wc/script-02.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/individual-shell-tools/wc/script-02.sh b/individual-shell-tools/wc/script-02.sh index 8feeb1a62..5520379b9 100755 --- a/individual-shell-tools/wc/script-02.sh +++ b/individual-shell-tools/wc/script-02.sh @@ -4,3 +4,4 @@ set -euo pipefail # TODO: Write a command to output the number of lines in the file helper-files/helper-3.txt. # The output should include the number 3. The output should not include the number 19. +wc -l ../helper-files/helper-3.txt \ No newline at end of file From a9ca738297b6081b958511b72f2fb04bd6fa68bc Mon Sep 17 00:00:00 2001 From: Sisu860 Date: Wed, 18 Nov 2026 12:56:49 +0000 Subject: [PATCH 11/31] Complete wc script-03 --- individual-shell-tools/wc/script-03.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/individual-shell-tools/wc/script-03.sh b/individual-shell-tools/wc/script-03.sh index 6b2e9d3d1..e6fdd8699 100755 --- a/individual-shell-tools/wc/script-03.sh +++ b/individual-shell-tools/wc/script-03.sh @@ -8,3 +8,4 @@ set -euo pipefail # 1 7 39 ../helper-files/helper-2.txt # 3 19 92 ../helper-files/helper-3.txt # 5 30 151 total +wc ../helper-files/* \ No newline at end of file From b0745e83c48569afee9e01c22ddbeb8b4b8ae803 Mon Sep 17 00:00:00 2001 From: Sisu860 Date: Wed, 18 Nov 2026 13:01:43 +0000 Subject: [PATCH 12/31] Complete grep script-01 --- individual-shell-tools/grep/script-01.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/individual-shell-tools/grep/script-01.sh b/individual-shell-tools/grep/script-01.sh index fb05f42f2..72cd51b58 100755 --- a/individual-shell-tools/grep/script-01.sh +++ b/individual-shell-tools/grep/script-01.sh @@ -4,3 +4,4 @@ set -euo pipefail # TODO: Write a command to output every line in dialogue.txt said by the Doctor. # The output should contain 6 lines. +grep "^Doctor:" dialogue.txt \ No newline at end of file From a09e15d3beb0b54f90245bbff46c8adfec7e8f0f Mon Sep 17 00:00:00 2001 From: Sisu860 Date: Wed, 18 Nov 2026 13:03:36 +0000 Subject: [PATCH 13/31] Complete grep script-02 --- individual-shell-tools/grep/script-02.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/individual-shell-tools/grep/script-02.sh b/individual-shell-tools/grep/script-02.sh index df6f85640..e95fec374 100755 --- a/individual-shell-tools/grep/script-02.sh +++ b/individual-shell-tools/grep/script-02.sh @@ -4,3 +4,4 @@ set -euo pipefail # TODO: Write a command to output every line in dialogue.txt that contains the word Doctor (regardless of case). # The output should contain 9 lines. +grep -i "Doctor" dialogue.txt \ No newline at end of file From 42c0ab67099a108fd240756510161b7c723916c1 Mon Sep 17 00:00:00 2001 From: Sisu860 Date: Wed, 18 Nov 2026 13:05:02 +0000 Subject: [PATCH 14/31] Complete grep script-03 --- individual-shell-tools/grep/script-03.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/individual-shell-tools/grep/script-03.sh b/individual-shell-tools/grep/script-03.sh index 5383fe578..869dd1c22 100755 --- a/individual-shell-tools/grep/script-03.sh +++ b/individual-shell-tools/grep/script-03.sh @@ -4,3 +4,4 @@ set -euo pipefail # TODO: Write a command to output the number of lines in dialogue.txt that contain the word Doctor (regardless of case). # The output should be exactly the number 9. +grep -ic "Doctor" dialogue.txt \ No newline at end of file From d8164515fdade8153501609224148194a3d882d4 Mon Sep 17 00:00:00 2001 From: Sisu860 Date: Wed, 18 Nov 2026 13:06:56 +0000 Subject: [PATCH 15/31] Complete grep script-04 --- individual-shell-tools/grep/script-04.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/individual-shell-tools/grep/script-04.sh b/individual-shell-tools/grep/script-04.sh index 80ee04776..e6bc4075e 100755 --- a/individual-shell-tools/grep/script-04.sh +++ b/individual-shell-tools/grep/script-04.sh @@ -4,3 +4,4 @@ set -euo pipefail # TODO: Write a command to output every line in dialogue.txt that does not contain the word "Hello" (regardless of case). # The output should contain 10 lines. +grep -iv "Hello" dialogue.txt \ No newline at end of file From e2f161ceea44eb34a34681d0d2972f0e4e9976d4 Mon Sep 17 00:00:00 2001 From: Sisu860 Date: Wed, 18 Nov 2026 13:08:39 +0000 Subject: [PATCH 16/31] Complete grep script-05 --- individual-shell-tools/grep/script-05.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/individual-shell-tools/grep/script-05.sh b/individual-shell-tools/grep/script-05.sh index 1eb538185..a7e28a473 100755 --- a/individual-shell-tools/grep/script-05.sh +++ b/individual-shell-tools/grep/script-05.sh @@ -4,3 +4,4 @@ set -euo pipefail # TODO: Write a command to output every line in dialogue.txt that contains the string "cure", as well as the line before that line. # The output should contain two pairs of two lines of text (with a separator between them). +grep -B 1 "cure" dialogue.txt \ No newline at end of file From 3a440d02eedd93cb0742adbf8b8784dbc67e6205 Mon Sep 17 00:00:00 2001 From: Sisu860 Date: Wed, 18 Nov 2026 13:11:03 +0000 Subject: [PATCH 17/31] Complete grep script-06 --- individual-shell-tools/grep/script-06.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/individual-shell-tools/grep/script-06.sh b/individual-shell-tools/grep/script-06.sh index 5670e3b6c..b20d6564a 100755 --- a/individual-shell-tools/grep/script-06.sh +++ b/individual-shell-tools/grep/script-06.sh @@ -4,3 +4,4 @@ set -euo pipefail # TODO: Write a command to output the name of every `.txt` file in this directory which contains a line of dialogue said by the Doctor. # The output should contain two filenames. +grep -l "^Doctor:" *.txt \ No newline at end of file From 35eaa8c59dce8211b2258f053298369f1179ed6d Mon Sep 17 00:00:00 2001 From: Sisu860 Date: Wed, 18 Nov 2026 13:12:29 +0000 Subject: [PATCH 18/31] Complete grep script-07 --- individual-shell-tools/grep/script-07.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/individual-shell-tools/grep/script-07.sh b/individual-shell-tools/grep/script-07.sh index 9670ebad9..4b287aa4f 100755 --- a/individual-shell-tools/grep/script-07.sh +++ b/individual-shell-tools/grep/script-07.sh @@ -4,3 +4,4 @@ set -euo pipefail # TODO: Write a command to output, for each `.txt` file in this directory, how many lines of dialogue the Doctor has. # The output should show that dialogue.txt contains 6 lines, dialogue-2.txt contains 2, and dialogue-3.txt contains 0. +grep -c "^Doctor:" *.txt \ No newline at end of file From 506352be2bf1937e16635a93013d575ea1830c07 Mon Sep 17 00:00:00 2001 From: Sisu860 Date: Wed, 18 Nov 2026 13:20:26 +0000 Subject: [PATCH 19/31] Complete sed script-01 --- individual-shell-tools/sed/script-01.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/individual-shell-tools/sed/script-01.sh b/individual-shell-tools/sed/script-01.sh index d592970fc..6255a124b 100755 --- a/individual-shell-tools/sed/script-01.sh +++ b/individual-shell-tools/sed/script-01.sh @@ -5,3 +5,4 @@ set -euo pipefail # TODO: Write a command to output input.txt with all occurrences of the letter `i` replaced with `I`. # The output should contain 11 lines. # The first line of the output should be: "ThIs Is a sample fIle for experImentIng wIth sed.". +sed 's/i/I/g' input.txt \ No newline at end of file From 0ae7c3f1a73663684ff84bb6a77dd78eb432623b Mon Sep 17 00:00:00 2001 From: Sisu860 Date: Wed, 18 Nov 2026 13:21:44 +0000 Subject: [PATCH 20/31] Complete sed script-02 --- individual-shell-tools/sed/script-02.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/individual-shell-tools/sed/script-02.sh b/individual-shell-tools/sed/script-02.sh index abdd64d06..d3f70b8ce 100755 --- a/individual-shell-tools/sed/script-02.sh +++ b/individual-shell-tools/sed/script-02.sh @@ -5,3 +5,4 @@ set -euo pipefail # TODO: Write a command to output input.txt with numbers removed. # The output should contain 11 lines. # Line 6 of the output should be " Alisha". +sed 's/[0-9]//g' input.txt \ No newline at end of file From 5e4b2c351990b6efdd6d74e25acbb10814efa8fc Mon Sep 17 00:00:00 2001 From: Sisu860 Date: Wed, 18 Nov 2026 13:23:50 +0000 Subject: [PATCH 21/31] Complete sed script-03 --- individual-shell-tools/sed/script-03.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/individual-shell-tools/sed/script-03.sh b/individual-shell-tools/sed/script-03.sh index dd284a296..02b29409e 100755 --- a/individual-shell-tools/sed/script-03.sh +++ b/individual-shell-tools/sed/script-03.sh @@ -4,3 +4,4 @@ set -euo pipefail # TODO: Write a command to output input.txt removing any line which contains a number. # The output should contain 6 lines. +sed '/[0-9]/d' input.txt \ No newline at end of file From 4e0747c956888d3dae3f9d9392b97d7015897812 Mon Sep 17 00:00:00 2001 From: Sisu860 Date: Wed, 18 Nov 2026 13:25:13 +0000 Subject: [PATCH 22/31] Complete sed script-04 --- individual-shell-tools/sed/script-04.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/individual-shell-tools/sed/script-04.sh b/individual-shell-tools/sed/script-04.sh index 0052ac6c4..478211422 100755 --- a/individual-shell-tools/sed/script-04.sh +++ b/individual-shell-tools/sed/script-04.sh @@ -4,3 +4,4 @@ set -euo pipefail # TODO: Write a command to output input.txt replacing every occurrence of the string "We'll" with "We will". # The output should contain 11 lines. +sed "s/We'll/We will/g" input.txt \ No newline at end of file From 97cc2ff30ac3a0e0d774eb616d5f8a7414078363 Mon Sep 17 00:00:00 2001 From: Sisu860 Date: Wed, 18 Nov 2026 13:28:35 +0000 Subject: [PATCH 23/31] Complete sed script-05 --- individual-shell-tools/sed/script-05.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/individual-shell-tools/sed/script-05.sh b/individual-shell-tools/sed/script-05.sh index 2dcc91a0c..a84551d5c 100755 --- a/individual-shell-tools/sed/script-05.sh +++ b/individual-shell-tools/sed/script-05.sh @@ -6,3 +6,4 @@ set -euo pipefail # If a line starts with a number and a space, make the line instead end with a space and the number. # So line 6 which currently reads "37 Alisha" should instead read "Alisha 37". # The output should contain 11 lines. +sed -E 's/^([0-9]+) (.*)$/\2 \1/' input.txt \ No newline at end of file From 44f458b7c7faf5012b0e2075787196a90b18fa72 Mon Sep 17 00:00:00 2001 From: Sisu860 Date: Wed, 18 Nov 2026 13:30:07 +0000 Subject: [PATCH 24/31] Complete sed script-06 --- individual-shell-tools/sed/script-06.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/individual-shell-tools/sed/script-06.sh b/individual-shell-tools/sed/script-06.sh index 0b9390170..83a2adf02 100755 --- a/individual-shell-tools/sed/script-06.sh +++ b/individual-shell-tools/sed/script-06.sh @@ -8,3 +8,4 @@ set -euo pipefail # The output should contain 11 lines. # Line 3 should be "It contains many lines, and there are some things you may want to do with each of them.". # Line 11 should be "We also should remember, when we go shopping, to get 4 items: oranges, cheese, bread, olives.". +sed -E 's/,([^ ])/, \1/g' input.txt \ No newline at end of file From d6ceb39e95751e0986d903f00bd19d8aa28737a6 Mon Sep 17 00:00:00 2001 From: Sisu860 Date: Wed, 18 Nov 2026 13:33:38 +0000 Subject: [PATCH 25/31] Complete awk script-01 --- individual-shell-tools/awk/script-01.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/individual-shell-tools/awk/script-01.sh b/individual-shell-tools/awk/script-01.sh index 8db4390af..824e4c58b 100755 --- a/individual-shell-tools/awk/script-01.sh +++ b/individual-shell-tools/awk/script-01.sh @@ -4,3 +4,4 @@ set -euo pipefail # TODO: Write a command to output just the names of each player in `scores-table.txt`. # Your output should contain 6 lines, each with just one word on it. +awk '{print $1}' scores-table.txt \ No newline at end of file From f1225aee5e8980112aaab288b0f43b0db5d3bcc9 Mon Sep 17 00:00:00 2001 From: Sisu860 Date: Wed, 18 Nov 2026 13:35:15 +0000 Subject: [PATCH 26/31] Complete awk script-02 --- individual-shell-tools/awk/script-02.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/individual-shell-tools/awk/script-02.sh b/individual-shell-tools/awk/script-02.sh index 5956be9bd..5559ca2fb 100755 --- a/individual-shell-tools/awk/script-02.sh +++ b/individual-shell-tools/awk/script-02.sh @@ -4,3 +4,4 @@ set -euo pipefail # TODO: Write a command to output the names of each player, as well as their city. # Your output should contain 6 lines, each with two words on it, separated by a space. +awk '{print $1, $2}' scores-table.txt \ No newline at end of file From cdce2f9cd7c91b2eb3cfd43ffb9b726a8dc1e528 Mon Sep 17 00:00:00 2001 From: Sisu860 Date: Wed, 18 Nov 2026 13:36:12 +0000 Subject: [PATCH 27/31] Complete awk script-03 --- individual-shell-tools/awk/script-03.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/individual-shell-tools/awk/script-03.sh b/individual-shell-tools/awk/script-03.sh index af7c6e8b9..87c511f6e 100755 --- a/individual-shell-tools/awk/script-03.sh +++ b/individual-shell-tools/awk/script-03.sh @@ -5,3 +5,4 @@ set -euo pipefail # TODO: Write a command to output just the names of each player along with the score from their first attempt. # Your output should contain 6 lines, each with one word and one number on it. # The first line should be "Ahmed 1". +awk '{print $1, $3}' scores-table.txt \ No newline at end of file From 6da2c8b2841b239af4710a063576a136323ea93a Mon Sep 17 00:00:00 2001 From: Sisu860 Date: Wed, 18 Nov 2026 13:38:15 +0000 Subject: [PATCH 28/31] Complete awk script-04 --- individual-shell-tools/awk/script-04.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/individual-shell-tools/awk/script-04.sh b/individual-shell-tools/awk/script-04.sh index bf15703c7..23d8eaf7b 100755 --- a/individual-shell-tools/awk/script-04.sh +++ b/individual-shell-tools/awk/script-04.sh @@ -5,3 +5,4 @@ set -euo pipefail # TODO: Write a command to output just the names of each player in London along with the score from their last attempt. # Your output should contain 3 lines, each with one word and one number on it. # The first line should be "Ahmed 4". +awk '$2 == "London" {print $1, $NF}' scores-table.txt \ No newline at end of file From 318d95058b7d75dcf6d3120d8f780778a9217d3e Mon Sep 17 00:00:00 2001 From: Sisu860 Date: Wed, 18 Nov 2026 13:40:13 +0000 Subject: [PATCH 29/31] Complete awk script-05 --- individual-shell-tools/awk/script-05.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/individual-shell-tools/awk/script-05.sh b/individual-shell-tools/awk/script-05.sh index d1680cb02..0ccc8341f 100755 --- a/individual-shell-tools/awk/script-05.sh +++ b/individual-shell-tools/awk/script-05.sh @@ -5,3 +5,4 @@ set -euo pipefail # TODO: Write a command to output just the names of each player along with the number of times they've played the game. # Your output should contain 6 lines, each with one word and one number on it. # The first line should be "Ahmed 3". +awk '{print $1, NF-2}' scores-table.txt \ No newline at end of file From a2374ba797b2b74182c5299022f345a4c161647d Mon Sep 17 00:00:00 2001 From: Sisu860 Date: Wed, 18 Nov 2026 13:43:33 +0000 Subject: [PATCH 30/31] Complete awk script-06 --- individual-shell-tools/awk/script-06-stretch.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/individual-shell-tools/awk/script-06-stretch.sh b/individual-shell-tools/awk/script-06-stretch.sh index 0201e6378..6a268bbeb 100755 --- a/individual-shell-tools/awk/script-06-stretch.sh +++ b/individual-shell-tools/awk/script-06-stretch.sh @@ -6,3 +6,4 @@ set -euo pipefail # TODO: Write a command to output the total of adding together all players' first scores. # Your output should be exactly the number 54. +awk '{sum += $3} END {print sum}' scores-table.txt \ No newline at end of file From b182c6bc1c7ae0bf19b844800a81b92c04fae9c6 Mon Sep 17 00:00:00 2001 From: Sisu860 Date: Wed, 18 Nov 2026 13:45:13 +0000 Subject: [PATCH 31/31] Complete awk script-07 --- individual-shell-tools/awk/script-07-stretch.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/individual-shell-tools/awk/script-07-stretch.sh b/individual-shell-tools/awk/script-07-stretch.sh index 3f7155880..e05b7bd89 100755 --- a/individual-shell-tools/awk/script-07-stretch.sh +++ b/individual-shell-tools/awk/script-07-stretch.sh @@ -7,3 +7,4 @@ set -euo pipefail # TODO: Write a command to output just the names of each player along with the total of adding all of that player's scores. # Your output should contain 6 lines, each with one word and one number on it. # The first line should be "Ahmed 15". The second line should be "Basia 37" +awk '{t=0; for(i=3; i<=NF; i++) t+=$i; print $1, t}' scores-table.txt \ No newline at end of file