Azure batch - run multiple commands from command l

2019-08-16 09:00发布

At the beginning, I created a pool with the following configuration:

"Publisher": "microsoft-ads"

"Offer": "linux-data-science-vm"

"Sku": "linuxdsvm"

Then I want "start.sh" file to be copied and run on VM. So, I need to change permissions, to allow execution of start.sh and then execute it.

chmod +x start.sh && ./start.sh

When I run it manually from terminal it works. But Azure Batch writes the following in the stderr.txt:

chmod: cannot access '&&': No such file or directory

Is there some way to run multiple commands from single Command Line?

1条回答
女痞
2楼-- · 2019-08-16 09:29

You should start the command with /bin/bash -cand then put the command in double quotes, like this: /bin/bash -c "chmod +x start.sh && ./start.sh"

查看更多
登录 后发表回答