1

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?

geisterfurz007
  • 5,292
  • 5
  • 33
  • 54
Andrei Barbolin
  • 395
  • 1
  • 3
  • 13
  • Stack Overflow is a site for programming and development questions. This question appears to be off-topic because it is not about programming or development. See [What topics can I ask about here](http://stackoverflow.com/help/on-topic) in the Help Center. Perhaps [Super User](http://superuser.com/) or [Unix & Linux Stack Exchange](http://unix.stackexchange.com/) would be a better place to ask. – jww May 02 '18 at 02:13
  • Yes, sure. I thought that there were some differences between Azure Batch command line and Linux Terminal. – Andrei Barbolin May 03 '18 at 10:30

1 Answers1

2

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"

gezzahead
  • 1,196
  • 1
  • 11
  • 20