Operating System - HP-UX
1753802 Members
8258 Online
108805 Solutions
New Discussion

Re: Command to display executable version

 
Gary Cooper_1
Esteemed Contributor

Command to display executable version

I'm sure I came across a shell (ksh) command that displayed the version of an executable, something along the lines of...

$ <show_version> /usr/bin/diff

 

But I can't for the life of me remember what it was.

 

I'm not looking for the regular 'swlist', but something that looks inside the file (which is supplied as a parameter).

 

Many thanks,

 

Gary

2 REPLIES 2
Patrick Wallek
Honored Contributor

Re: Command to display executable version

The command you're looking for is 'what'.

 

# what /usr/bin/diff
/usr/bin/diff:
diff.c $Date: 2002/06/03 03:20:39 $Revision: r11.11/2 PATCH_11.11 (PHCO_26907)
diffdir.c $Date: 2002/06/03 03:20:03 $Revision: r11.11/3 PATCH_11.11 (PHCO_26907)
diffreg.c $Date: 2002/06/03 03:18:35 $Revision: r11.11/3 PATCH_11.11 (PHCO_26907)
$Revision: @(#) diff CUP11.11_BL2002_0617_2 PATCH_11.11 PHCO_26907
Mon Jun 17 05:04:06 PDT 2002 $

SoumitraC
Frequent Advisor

Re: Command to display executable version

In addition to 'what', the program 'ident' can be useful in certain scenarios, e.g. when the binary is built using sources controlled under RCS.

 

Soumitra C
HP-UX Compilers