Skip to content

Commit 4813fff

Browse files
committed
Fix the regex to esclude only additional uppercase letters
1 parent ebfc198 commit 4813fff

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

shell-pipelines/ls-grep/script-04.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,4 @@ set -euo pipefail
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.
77

8-
# ls sample-files | grep "^[A-Z][a-z]*$"
9-
ls sample-files | grep -c "^[A-Z][a-z]*$"
8+
ls sample-files | grep -c "^[A-Z][^A-Z]*$"

0 commit comments

Comments
 (0)