bash - Linux command variable substitution. Assistance is appreciated -


i zip files/dirs while excluding few listed within variable $excludes. following piece of code not excluding files. please help! thanks!

excludes='"dir1/*" "dir2/*" "dir3/*"' zip -r zipfile * -x $excludes  

this should work:

zip -r zipfile * -x dir1/* dir2/* dir3/* 

or should work:

excludes='dir1/* dir2/* dir3/*' zip -r zipfile * -x "$excludes" 

Comments

Popular posts from this blog

css - I want to align grid in center -

Contact Form PHP Email Script -

python - SWIG function not printing output -