[Snort-users] Can't Parse "snort -V"

JP Vossen vossenjp at ...8683...
Thu Jul 31 19:44:05 EDT 2003

> Date: Thu, 31 Jul 2003 12:15:19 -0700 (PDT)
> From: John Crain <port123tcp at ...131...>
> To: snort-users <snort-users at 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]).


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

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

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

More information about the Snort-users mailing list