9 Replies Latest reply on Jan 19, 2007 8:21 AM by Bill Robinson

    <cmd> | grep | awk etc, in Windows cmd (blpackage external command)

      I want to perform an action, in a blpackage external command, on a windows server, depending on the output of a previous command.


      The previous command is:



      gacutil /l "<Assembly>,Version=<version>"

      This gives output similar to the following:


      Microsoft (R) .NET Global Assembly Cache Utility. Version 1.1.4322.573
      Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.

      The Global Assembly Cache contains the following assemblies:
      <Assembly>, Version=<version>, Culture=<culture>, PublicKeyToken=<publickeytoken>, Custom=null

      The cache of ngen files contains the following entries:

      Number of items = X

      If the last character (X) is a 0, I want to perform the next command (install the dll), otherwise I will exit 0 from the external command (because the dll is already installed).


      If I was doing this on a unix server I would simply pipe the command through grep and cut (or awk) and get my single digit output, but how can I do this in Windows???