0

I am trying to find and untar a tgz file, if i do the same things manually it works fine, but in script it does not works

i have tgz file in current directory as: pini-chart-2.0.0-0.0-15.tgz

and running the script:

#! /bin/sh.
pini= $(find . -name 'pini-chart-2*' -printf '%f\n')

echo $pini
tar -xvf $pini

find command works well but the tar command does not output:


pini-chart-2.0.0-0.0-15.tgz

tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors

but i do the same things manually it works please help!

dhandai
  • 77
  • 1
  • 3
  • 17

0 Answers0