如何链接未完全完成的命令

时间:2019-04-25 06:54:25

标签: bash

我在AWS上有5个工作服务器,通常只需执行此操作即可每天将代码部署到其中

%%~fA

等等。

整个过程的输出如下:

eb deploy production-cron
eb deploy production-payments

我知道我可以链接eb deploy ➜ backend git:(master) eb deploy production-payments Creating application version archive "app-8726-190425_144820". Uploading: [##################################################] 100% Done... -- Events -- (safe to Ctrl+C) Use "eb abort" to cancel the command. 2019-04-25 06:48:34 INFO Environment update is starting. 2019-04-25 06:49:16 INFO Deploying new version to instance(s). 2019-04-25 06:49:53 INFO Successfully loaded 16 scheduled tasks from cron.yaml. 2019-04-25 06:50:17 INFO New application version was deployed to running EC2 instances. 2019-04-25 06:50:17 INFO Environment update completed successfully. Alert: An update to the EB CLI is available. Run "pip install --upgrade awsebcli" to get the latest version. 之类的命令

但这需要我等待第一个命令完全完成

基本上,我希望以后可以链接这些命令

production-cron && eb deploy production-payments

弹出我要-- Events -- (safe to Ctrl+C) Use "eb abort" to cancel the command.的位置,然后开始下一个部署。

如果有人知道如何使用甚至更好的aws ctrl+c命令将其部署到多个环境中

1 个答案:

答案 0 :(得分:1)

也许使用像tmux这样的终端多路复用器?

tmux split-window 'exec eb deploy production-cron'
tmux split-window 'exec eb deploy production-payments'

这将在单独的窗口中启动命令,完成后将其清理。也许exec就足够了。不太了解您的Ctrl + C交互。