System Administration
Showing results for 
Search instead for 
Do you mean 

find awk version on HP-UX ia64 B.11.31

Occasional Visitor

find awk version on HP-UX ia64 B.11.31

How to find awk version on my HP-UX ia64 B.11.31 system ??
7 REPLIES
Honored Contributor Honored Contributor

Re: find awk version on HP-UX ia64 B.11.31

Why do you care? If you knew its version,
what would you do with the information?

Is there some actual problem which you are
trying to solve?
Acclaimed Contributor Acclaimed Contributor

Re: find awk version on HP-UX ia64 B.11.31

Hi:

HP offers "HP's" implementation. If you are expecting some GNU variant, don't.

You could try something like:

# file /usr/bin/awk

Regards!

...JRF...
Honored Contributor Honored Contributor

Re: find awk version on HP-UX ia64 B.11.31

To get some number or Patch information:

what /usr/bin/awk

hth
Stephan
Occasional Visitor

Re: find awk version on HP-UX ia64 B.11.31

One of the customer is facing a problem which executing a batch file, they are getting the error
"CBALLPR cannot have more than 199 fields"

This same batch file is working properly on another server, so they need to confirm if "awk" version is same on both servers or not....

$ awk --version
Usage: awk [-F fs][-v Assignment][-f Progfile|Program][Assignment|File] ...
$ file /usr/bin/awk
/usr/bin/awk: ELF-32 executable object file - IA64

How can I find version from above ?


Acclaimed Contributor Acclaimed Contributor

Re: find awk version on HP-UX ia64 B.11.31

Hi (again):

> "CBALLPR cannot have more than 199 fields"

This same batch file is working properly on another server, so they need to confirm if "awk" version is same on both servers or not....

Non-GNU 'awk' as found on HP-UX has the 199-field limitation.

If the same code is working on another server, ask the question (1) is this an HP-UX server, too, with a "standard" 'awk' *AND* is the data being processed identical.

If you are concerned about patches, do something like:

# swlist -l product|grep -i awk

Regards!

...JRF...
Occasional Visitor

Re: find awk version on HP-UX ia64 B.11.31

$ what /usr/bin/awk
/usr/bin/awk:
main.c $Date: 2009/02/17 15:25:17 $Revision: r11.31/1 PATCH_11.31 (PHCO_36132)
run.c $Date: 2009/02/17 15:25:20 $Revision: r11.31/1 PATCH_11.31 (PHCO_36132)
$Revision: @(#) awk R11.31_BL2009_0427_1 PATCH_11.31 PHCO_36132

"what /usr/bin/awk" works...!!!!
Acclaimed Contributor Acclaimed Contributor

Re: find awk version on HP-UX ia64 B.11.31

>"CBALLPR cannot have more than 199 fields"

This is an HP-UX awk limitation. You need to use gawk.

>This same batch file is working properly on another server, so they need to confirm if "awk" version is same on both servers or not.
$ awk --version
Usage: awk [-F fs][-v Assignment]

This may work with gawk, not HP's.
If it works on another system, as JRF suggested, perhaps the data is different?

>what /usr/bin/awk works

So do you have PHCO_36132 on both?