Automation, Orchestration, and Scripting

A script prompts for confirmation and stores the reply in $answer. A case statement must run the same branch whether the user types y, Y, yes, YES or any other capitalization of yes. Which pattern line does this?

Show the answer

Correct answerB. [yY]|[yY][eE][sS])

A pipe separates alternative patterns, and bracket expressions cover both cases of each letter, so this matches y and any capitalization of yes. The comma line is tempting but commas are literal in case patterns, and the other globs fail to match a lone y.