findstr, for, or other command to do this?

From: djc (noone_at_nowhere.com)
Date: 04/27/04


Date: Tue, 27 Apr 2004 15:11:09 -0400

Situation: I have a log file with many fields and lines. Each line has say
a computername field. The same computername will be listed several times
thoughout the file. What if I wanted a list of computer names from the file?
meaning 1 instance of each name returned from a command?

example: A log file has 2 fields. ComputerName and DLLVersion. I want to
construct a command or batch file that will return a unique list of computer
names that do not have a DLLVersion equal to 4.1.002. Just using the find
command gets me close but its not a unique list. The same computer names
will be listed multiple times.

any input is appreciated. Thanks.



Relevant Pages

  • Re: findstr, for, or other command to do this?
    ... >a computername field. ... The same computername will be listed several times ... >thoughout the file. ... >construct a command or batch file that will return a unique list of computer ...
    (microsoft.public.win2000.cmdprompt.admin)
  • Re: File association works on one machine and not another
    ... your suggestion echo %ComputerName%> c:\test.txt". ... If I use "echo" in the command, I simply get returned to the ...   echo %ComputerName%> c:\test.txt ...
    (microsoft.public.win2000.general)
  • Re: 2 workstation names
    ... SET command on a command prompt. ... LOGONSERVER - The authenticating domain controller ComputerName, ... For some reason I seem to have 2 workstation names on my W2K ...
    (microsoft.public.win2000.networking)
  • Re: Shutdown.exe fails when computer is locked
    ... computername: The machine is locked and can not be shut down without the ... Add -f (i.e. force to your command line) ... This posting is provided "AS IS" with no warranties, ... > indicates successful completion. ...
    (microsoft.public.windowsxp.security_admin)
  • Re: Shutdown.exe fails when computer is locked
    ... Eric - thanks a bunch. ... >computername: The machine is locked and can not be shut ... >Add -f (i.e. force to your command line) ... >> indicates successful completion. ...
    (microsoft.public.windowsxp.security_admin)