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
Post a Comment