You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know this is not an issue but I needed help with a script and this is the only way I can reach out.
Bash: Pattern Matching
Given an array of strings, count the strings
that contain at least one uppercase character
and output the result to stdout.
Example:
my array=[FirstWord" "Word2" "thirdiword']
The match_uppercase function will return 2
since "FirstWord" and "Word2" each contain
an uppercase letter.
function match_uppercase(){
typeset -a data = ("$@")
// Code goes here
}
Sample Input For Custom Testing
Abc
bcd
Efs
def
cDe
Sample Output
Explanation
There are 3 strings containing at least one
uppercase character: Abc', "Efg". and
TCDe".
The text was updated successfully, but these errors were encountered:
Repository owner
locked and limited conversation to collaborators
Feb 27, 2022
I know this is not an issue but I needed help with a script and this is the only way I can reach out.
Bash: Pattern Matching
Given an array of strings, count the strings
that contain at least one uppercase character
and output the result to stdout.
Example:
my array=[FirstWord" "Word2" "thirdiword']
The match_uppercase function will return 2
since "FirstWord" and "Word2" each contain
an uppercase letter.
Sample Input For Custom Testing
Abc
bcd
Efs
def
cDe
Sample Output
Explanation
There are 3 strings containing at least one
uppercase character: Abc', "Efg". and
TCDe".
The text was updated successfully, but these errors were encountered: