Using Shell Script in place of Perl script to Unzip the zip files.

Hi Expert,

We have some shell scripts which Internally uses Perl Script to Unzip the source zip files which comes to inbound directory. So now our requirement is to avoid the dependency on Perl Script and us Shell Script to unzip the files. I have the Perl script with me attached can some one help in writing the Shell Script for this which should unzip the files from inbound directory.
I an new to Shell Scripting so some one plese help me on this.
I have attached the Perl script punzip.pl and the Shell script which internally calls the this perl script and unzips. the files.

Any help is highly appreciated.

Regards,
Naveen

To zip a file use command gzip filename

This will create filename.gz

To unzip the same file use gunzip filename.gz

This should help you kick start conversion process of perl to shell script.

Thanks Balajesuri it worked like a Rocket..:b:

Naveen

---------- Post updated at 02:30 PM ---------- Previous update was at 11:20 AM ----------

Hi Balajesuri,

It again failed by giving this message.

gunzip: edw_ord_extr_agg_MYST_20131023.070305.zip: unknown suffix -- ignored
gunzip: /DI_Data_AT1/collections/inbound_sftp_jails/./home/mystsftp/inbound is a directory -- ignored

Can you help me on this please.

naveeen

from the man pages: