Ignite-UX Custom Configuration files

The it
ems of most interest here are the regular expressions shown since they need improvement.
The next section discusses what the regular expressions do.
The regular expression "9000/8.*" means match for the pattern 9000/8 followed by zero or
more characters. The "." means any character, and the following "*" changes that to mean zero
(0) or more of that character. The regular expression "9000/8" is more precise since it just
matches any string containing "9000/8"; the ".*" is superfluous. Since the expression is not
anchored,
59
nothing else is needed in the regular expression.
The same thing applies to the "ia64 .* server .*", it could be more simply written as
"ia64.*server". Since it is an unanchored expression, you do not have to worry about what
comes before or after the string. The changed expression matches ia64 followed by zero or more
of any character followed by server. Again, because it is unanchored you do not care about what
comes after the server part of the expression so there is no need for an explicit ".*" at the end of
the expression.
For PA-RISC servers and Itanium®-based servers, when the Base HP-UX OE is selected, the sw_sel
"English" is automatically selected.
HARDWARE_MODEL ~ "9000/8.*" | MODEL ~ "ia64 .* server .*" {
(sw_sel "OE91BaseOS32") | (sw_sel "OE90BaseOS64") {
init sw_sel "English" = TRUE
}
} # end of hardware-specific section
else {
The same thing discussed previously about regular expressions also applies to the workstation
regular expressions that follow.
If you have a workstation, initialize the sw_sel clause, "Global", to be TRUE.
HARDWARE_MODEL ~ "9000/7.*" | MODEL ~ "ia64 .* workstation .*" {
(sw_sel "OE91BaseOS32") | (sw_sel "OE90BaseOS64") {
init sw_sel "Global" = TRUE
}
} # end of hardware-specific section
Otherwise the sw_sel "English" is set to TRUE.
else {
(sw_sel "OE91BaseOS32") | (sw_sel "OE90BaseOS64") {
init sw_sel "English" = TRUE
}
}
59
Regular Expression anchoring involves a "^" to indicate the start of the line to match against, and "$" to indicate the
end of the line. For example 'print "baaaa" |grep "^aaaa"' does not match anything because the text being
passed through grep starts with a "b". The "^aaaa" says to only match lines starting with "aaaa" at the very start of
the line, so the expression is anchored to the start of the line. The use of "$" similarly anchors the expression to the end of
the line.
113