Skip to main content
added 18 characters in body
Source Link

Here's what I've found working to exclude a more precise method that does not mismatch on non-casks, forces brew list to output single line and matching exactly on multiple cask from upgradingnames:

brew upgrade --cask $(brew list --cask -1 | perlgrep -pFv -e 's#\s+#\n#g' | grepcask1 -ve cask-namecask2) 

Here's what I've found working to exclude a cask from upgrading:

brew upgrade --cask $(brew list --cask | perl -p -e 's#\s+#\n#g' | grep -v cask-name) 

Here's a more precise method that does not mismatch on non-casks, forces brew list to output single line and matching exactly on multiple cask names:

brew upgrade --cask $(brew list --cask -1 | grep -Fv -e cask1 -e cask2) 
Source Link

Here's what I've found working to exclude a cask from upgrading:

brew upgrade --cask $(brew list --cask | perl -p -e 's#\s+#\n#g' | grep -v cask-name)