Я пытаюсь создать простой оператор if
и хочу, чтобы он игнорировал регистр.Не удается заставить параметр lc работать?
Это мой псевдо-код:
if (Lowercase $xxx notequal lowercase "xxx")
{......}
Я пробовал:
if (-lc $ConfigAppUsers -ne -lc "No" )
if ( lc $ConfigAppUsers -ne lc "No" )
if ((lc $ConfigAppUsers) -ne (lc "No"))
if ((-lc $ConfigAppUsers) -ne (-lc "No"))
и я всегда получаю:
-lc : The term '-lc' is not recognized as the name of a cmdlet, function,
script file, or operable program. Check the spelling of the name, or if a
path was included, verify that the path is correct and try again.
At line:1 char:1
+ -lc "No"
+ ~~~
+ CategoryInfo : ObjectNotFound: (-lc:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Что я делаю неправильно?
'Lc«Perl»пе ЖХ«оболочки script'' –