hi all....
I'm a newbie to Shell scripting and am trying to make a simple script that can unpack a variety of .tgz , .zip, .tar or .tar.gz archives to the a current directory
i want the script to create a folder equivalent to the base name of the archive and then move the archive to a subdirectory named archive_store
so far i have done the following:
__________________________________
#!/bin/sh
for I in *.tar.gz;
do
A=`basename $I .tar.gz`
mkdir $A
cd $A
gunzip -c ../$I | tar xf -
cd..
done
_____________________________________
Need some help to expand this script to handle the other formats....
Thank you in advance and any help would be greatly appreciated
.