我经常一个接一个地运行以下命令。不知道能否用一行命令完成?
brew update
brew upgrade
brew cleanup
按顺序运行每个命令:
brew update; brew upgrade; brew cleanup
brew update && brew upgrade && brew cleanup
如果update
成功,但是upgrade
失败,那么cleanup
不会运行。
两者将从左到右执行命令。
&&
在出现错误时立即退出。我还提到了命令的执行顺序。你没有提供任何信息。另外请记住,这不是一场比赛。 - Trevor Hickeybrew services start mysql@5.7 nginx php
或者甚至是 brew services start all
会更好。 - Matt Fletcherbrew update; brew upgrade; brew cleanup;
echo thanks this is a test; echo ok here is new line, echo run another command here; ls; pwd; echo thanks i rock;
brew update; brew upgrade; brew cleanup
- Barmarbrew update && brew upgrade && brew cleanup
是同样的作用吗?我记得在某个地方看到过这个命令。 - Stickers