Snort mailing list archives

RE: Can't Parse "snort -V"


From: JP Vossen <vossenjp () netaxs com>
Date: Thu, 31 Jul 2003 22:42:28 -0400 (EDT)

Date: Thu, 31 Jul 2003 12:15:19 -0700 (PDT)
From: John Crain <port123tcp () yahoo com>
To: snort-users <snort-users () lists sourceforge net>
Subject: [Snort-users] Can't Parse "snort -V"

I'm attempting to automate snort version on multiple
sensors.  However, I can't parse "snort -V"...  snort
-V dumps to the screen and I can't grep or awk it.  I
can't even dump snort -V to a file with "snort -V >
file".

Any suggestions on how to grab the version number as
part of a command line function?

Good question.  Snort -V prints to STDERR, not STDOUT [0].  Try:

snort -V 2> yourfile
snort -V 2>&1 | grep Version

BTW, the above should work under both UNIX and Windows (cmd.exe anyway, and
assuming you have a Windows 'grep' in your path [1]).

Later,
JP

[0] http://www.jpsdomain.org/winshell/redirection.html

[1]  http://unxutils.sourceforge.net/
http://sourceforge.net/projects/gnuwin32/

------------------------------|:::======|--------------------------------
JP Vossen, CISSP              |:::======|         jp{at}jpsdomain{dot}org
My Account, My Opinions       |=========|       http://www.jpsdomain.org/
------------------------------|=========|--------------------------------
"The software said it requires Windows XP or better, so I installed
Linux..."



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Snort-users mailing list
Snort-users () lists sourceforge net
Go to this URL to change user options or unsubscribe:
https://lists.sourceforge.net/lists/listinfo/snort-users
Snort-users list archive:
http://www.geocrawler.com/redir-sf.php3?list=snort-users


Current thread: