5

Suppose I have the following command

curl -Lo .amb j.mp/docker-ambari && . .amb && amb-deploy-cluster

(assuming this is running on vagrant - so not a real machine)

And I know I've got a permission issue and want to add sudo - do I need to add it once:

sudo curl -Lo .amb j.mp/docker-ambari && . .amb && amb-deploy-cluster

or more?

sudo curl -Lo .amb j.mp/docker-ambari && sudo . .amb && sudo amb-deploy-cluster
1
  • This is a great question! Aug 25, 2014 at 14:23

1 Answer 1

5

Yes you have to use sudo for each command or

you can use

sudo sh -c "gedit first; gedit second"

Above creates a documets first and second with root privllages. Separate the commands with semicolon ;

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .