How to check tar version in Solaris?

for pkg in `pkginfo | grep tar | grep application | awk '{print $2}'`; do pkginfo -l $pkg | grep VERSION; done

Hi,

I tend to be a little less discerning when searching through a pkginfo output as I've been caught out by things in the past.

What I tend to use is a search as follows, a bit more work to check but it does check if the package might impact things.

pkginfo -l | nawk 'BEGIN { FS = "\n"; RS = "" }$0 ~ search { print $0 }' search=tar - | egrep 'PKGINST|VERSION'

Regards

Gull04

Hi.

With gtar :

$ which gtar
/usr/bin/gtar

$ gtar --version
tar (GNU tar) 1.27.1

On a systerm like:

OS, ker|rel, machine: SunOS, 5.11, i86pc
Distribution        : Solaris 11.3 X86
bash GNU bash 4.1.17
gtar tar (GNU tar) 1.27.1

Best wishes ... cheers, drl