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

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -