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)
Jan 25 2025, 6:22 AM
Unknown Object (File)
Jan 22 2025, 9:06 PM
Unknown Object (File)
Jan 10 2025, 9:27 AM
Unknown Object (File)
Dec 31 2024, 9:51 AM
Unknown Object (File)
Oct 24 2024, 11:55 PM
Unknown Object (File)
Oct 22 2024, 12:14 PM
Unknown Object (File)
Oct 3 2024, 12:16 AM
Unknown Object (File)
Oct 2 2024, 4:49 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.