>> On Wed, 22 Sep 2010, Jose P. Espinal wrote:
>>
>>> If you are using a script you could get the version with something like:
>>>
>>> tar -tf asterisk-1.4-current.tar.gz | head -n1

> On 09/22/2010 11:20 AM, Steve Edwards wrote:

>> You need a '-z' in there.

On Wed, 22 Sep 2010, Kevin P. Fleming wrote:

> Modern versions of 'tar' auto-detect gzip and bzip compression :-)

Gee. Who knew :)

CentOS 4.8 (tar 1.14) doesn't. CentOS 5.5 (tar 1.15.1) does.

Still, for scripting and portability, I'd recommend specifying the 
"decompressor" and using the long option form:

        tar\
                --list\
                --[un]gzip\
                --file\
                        asterisk-1.4-current.tar.gz


-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       [email protected]      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000

-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to