1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Gzip script

Discussion in 'Shell Script' started by kubber, Aug 28, 2010.

  1. kubber

    kubber New Member

    Joined:
    Aug 28, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi I need to create script that will work like this :

    (initial dir structure )
    /dirA
    .../dirA_1
    ...file1.txt
    ...file2.txt
    .../dirA_1_a
    ......file3.txt
    ......file4.txt
    ....../dirA_2
    .........file5.txt
    ........./dirA_2_a
    ............file6.txt
    ............file7.txt

    myScript.sh /dirA /destDir

    and the result is :
    /destDir
    .../dirA
    ....../dirA_1
    ......dirA_1.zip
    ........./dirA_1_a
    ............dirA_1_a.zip
    etc ..

    I hope you get the idea.
    Where do I start? Maybe there's a secret switch in tar or gzip?
     

Share This Page