linux - Zip multiple directories into one zip file -


 $ cat /home/myapp/properties.csv    /document/source/ /downloads/lib/ /home/app/newfiles/ 

the above simple file holds directories i'm interested in...

$ cat /home/myapp/zipup.sh #!/bin/bash  folder="/home/myapp/properties.csv" cat $folder| while read dir;  //zip directories read in 

how complete zipup.sh script directories , contents in each of directories defined in properties file included in single zip file i.e. result should this...

/result.zip     (everything goes in here)    /source                  /hello.class      /hello.jar    /lib        /xml.jar          /newfiles      /list.doc 

#!/bin/bash  while read dir;     dirs="$dirs $dir" done < /home/myapp/properties.csv  zip -r result $dirs 

Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -