kubber 0 Newbie Poster

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?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.