Page MenuHomeFreeBSD

checkkey.sh: Fix bogus character in case statement
AbandonedPublic

Authored by jlduran on Sep 6 2024, 6:51 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 21, 5:13 AM
Unknown Object (File)
Fri, Nov 21, 5:12 AM
Unknown Object (File)
Sat, Nov 15, 10:24 AM
Unknown Object (File)
Oct 28 2025, 2:03 AM
Unknown Object (File)
Oct 3 2025, 5:46 AM
Unknown Object (File)
Sep 22 2025, 4:22 AM
Unknown Object (File)
Sep 21 2025, 12:42 AM
Unknown Object (File)
Aug 20 2025, 2:56 AM

Details

Reviewers
None

Diff Detail

Repository
R9 FreeBSD doc repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

jlduran created this revision.

The change is wrong, the code is correct. See sh(1):

The pattern can actually be one or more patterns (see Shell Patterns described later), separated by ‘|’ characters. Tilde expansion, parameter expansion, command substitution, arithmetic expansion and quote removal are applied to the word. Then, each pattern is expanded in turn using tilde expansion, parameter expansion, command substitution and arithmetic expansion and the expanded form of the word is checked against it. If a match is found, the corresponding list is executed. If the selected list is terminated by the control operator ‘;&’ instead of ‘;;’, execution continues with the next list, continuing until a list terminated with ‘;;’ or the end of the case command.

I guess that's what I get for using macOS. You are absolutely right. Sorry for the noise.