Skip to content

Commit b0ea22c

Browse files
committed
use ls-grep-wc in a pipeline to count 7 files inside "sample-files" folder which names start with upper case letter & no more upper case letters for the following letters in the name
1 parent 68a1b49 commit b0ea22c

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +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

0 commit comments

Comments
 (0)