Skip to content

Commit 0f24817

Browse files
committed
added trailing lines + fixed script 4
1 parent f9d2cd5 commit 0f24817

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

shell-pipelines/ls-grep/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 the names of the files in the sample-files directory whose name contains at least one upper case letter.
66
# Your output should contain 11 files.
7-
ls sample-files | grep '[A-Z]'
7+
ls sample-files | grep '[A-Z]'

shell-pipelines/ls-grep/script-02.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 the names of the files in the sample-files directory whose name starts with an upper case letter.
66
# Your output should contain 10 files.
7-
ls sample-files | grep '^[A-Z]'
7+
ls sample-files | grep '^[A-Z]'

shell-pipelines/ls-grep/script-04.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 count the number of files in the sample-files directory whose name starts with an upper case letter and doesn't contain any other upper case letters.
66
# Your output should be the number 7.
7-
ls sample-files | grep '^[A-Z][a-z]*$' | wc -l
7+
ls sample-files | grep '^[A-Z][^A-Z]*$' | wc -l

shell-pipelines/tr/script-01.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ set -euo pipefail
66
# The author got feedback that they're using too many exclamation marks (!).
77
#
88
# TODO: Write a command to output the contents of text.txt with every exclamation mark (!) replaced with a full-stop (.).
9-
tr '!' '.' < text.txt
9+
tr '!' '.' < text.txt

shell-pipelines/tr/script-02.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ set -euo pipefail
77
# so every Y should be a Z, and every Z should be a Y!
88
#
99
# TODO: Write a command to output the contents of text.txt with every Y and Z swapped (both upper and lower case).
10-
tr 'YyZz' 'ZzYy' < text.txt
10+
tr 'YyZz' 'ZzYy' < text.txt

0 commit comments

Comments
 (0)