I want to match a string regardless of whether it is upper or lower case and I can't figure out how to do this. This seems pretty easy, but yet it crashes at runtime. Here is a snippit of my switch statement:
switch -nocase -- $termserver {
a { set termServerIP "172.23.129.10" }
b { set termServerIP "172.23.129.11" }
}
I've also tried:
switch -regexp -nocase -- $termserver {
a { set termServerIP "172.23.129.10" }
b { set termServerIP "172.23.129.11" }
}
Here is the error:
bad option "-nocase": should be -exact, -glob, -regexp, or --
while executing
Any ideas?
switch -nocase -- $termserver {
a { set termServerIP "172.23.129.10" }
b { set termServerIP "172.23.129.11" }
}
I've also tried:
switch -regexp -nocase -- $termserver {
a { set termServerIP "172.23.129.10" }
b { set termServerIP "172.23.129.11" }
}
Here is the error:
bad option "-nocase": should be -exact, -glob, -regexp, or --
while executing
Any ideas?