[wpkg-users] find/findstr and multibyte...

Marco Gaiarin gaio at sv.lnf.it
Tue May 24 17:31:36 CEST 2016


> 	https://windowsnlmtool.codeplex.com/

I reply to myself. I've done some test with 'findstring' and found that
some match are possible:

 C:\Users\Administrator>\\file\wpkg\tools\NLMtool64.exe | findstr /r /c:"C.a.t.e.g.o.r.y.:. .P.R.I.V.A.T.E."
                          C a t e g o r y :   P R I V A T E
 C:\Users\Administrator>echo %ERRORLEVEL%
 0

So i've setup that check condition on a recipe:

        <check type="logical" condition="or">
                <check type="logical" condition="and">
                        <check type="host" condition="architecture" value="x86" />
                        <check type="execute" path='%COMSPEC% /c "%WPKGROOT%\tools\NLMTool.exe" | findstr /r /c:"C.a.t.e.g.o.r.y.:. .P.R.I.V.A.T.E."' condition="exitcodeequalto" value="0" />
                </check>
                <check type="logical" condition="and">
                        <check type="host" condition="architecture" value="x64" />
                        <check type="execute" path='%COMSPEC% /c "%WPKGROOT%\tools\NLMTool64.exe" | findstr /r /c:"C.a.t.e.g.o.r.y.:. .P.R.I.V.A.T.E."' condition="exitcodeequalto" value="0" />         
                </check>
        </check>

if i use '%COMSPEC% /c', match is ever FALSE; if i omit it, match is
ever TRUE.

Why? Thanks.

-- 
dott. Marco Gaiarin				        GNUPG Key ID: 240A3D66
  Associazione ``La Nostra Famiglia''          http://www.lanostrafamiglia.it/
  Polo FVG   -   Via della Bontà, 7 - 33078   -   San Vito al Tagliamento (PN)
  marco.gaiarin(at)lanostrafamiglia.it   t +39-0434-842711   f +39-0434-842797

		Dona il 5 PER MILLE a LA NOSTRA FAMIGLIA!
    http://www.lanostrafamiglia.it/25/index.php/component/k2/item/123
	(cf 00307430132, categoria ONLUS oppure RICERCA SANITARIA)


More information about the wpkg-users mailing list