Skip to content

Commit 4d9525b

Browse files
committed
Output count of files which start with upper case letter and doesn't contain any other upper case letter
1 parent 1bf5ee1 commit 4d9525b

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
@@ -3,4 +3,5 @@
33
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.
6+
ls sample-files | grep -c '^[A-Z][^A-Z]*$'
67
# Your output should be the number 7.

0 commit comments

Comments
 (0)