Execute a statement /bin/bash seems not to work in Virtualbox clientExecute script in sh mode instead of bash...
Why "Having chlorophyll without photosynthesis is actually very dangerous" and "like living with a bomb"?
Important Resources for Dark Age Civilizations?
Can I ask the recruiters in my resume to put the reason why I am rejected?
What's that red-plus icon near a text?
What is the word for reserving something for yourself before others do?
What does it mean to describe someone as a butt steak?
Modeling an IP Address
Has there ever been an airliner design involving reducing generator load by installing solar panels?
Can you really stack all of this on an Opportunity Attack?
Watching something be written to a file live with tail
Was any UN Security Council vote triple-vetoed?
I'm flying to France today and my passport expires in less than 2 months
Alternative to sending password over mail?
Paid for article while in US on F-1 visa?
Can an x86 CPU running in real mode be considered to be basically an 8086 CPU?
Why are electrically insulating heatsinks so rare? Is it just cost?
Malformed Address '10.10.21.08/24', must be X.X.X.X/NN or
Is it tax fraud for an individual to declare non-taxable revenue as taxable income? (US tax laws)
Why do I get two different answers for this counting problem?
Why is Minecraft giving an OpenGL error?
Can a Cauchy sequence converge for one metric while not converging for another?
How can bays and straits be determined in a procedurally generated map?
What would happen to a modern skyscraper if it rains micro blackholes?
What defenses are there against being summoned by the Gate spell?
Execute a statement /bin/bash seems not to work in Virtualbox client
Execute script in sh mode instead of bash in ShellWhy does /bin/sh point to /bin/dash and not /bin/bash?Change Gsetting with script on LogoutNot able to execute a .sh file: /bin/bash^M: bad interpretermysql statement in bash shell script does not work / syntax errorunable to execute after loading second shell /bin/bash?Multiple comparison statement in bash fails - bash: [: missing `]'/bin/bash How to interact with python virtualenv?exec command bin bashbash - return and print statementBash: 'if' statement always seems to evaluate first condition as true even when false
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I do not know if AskUbuntu is the correct place to ask or Stack Overflow.
To execute a statement in Windows use : C:\Windows\System32\cmd.exe
What is the equivalent in Ubuntu? I thought it was : /bin/bash
but that does not work for me. I tried /bin/sh
and /bin/dash
( like shown here )but without result.
In Virtualbox client I want to be able to execute a statement. For this I use pyvbox which is a Python shell for the virtualbox API.
After installing execute in statement in Virtualbox Windows client is possible with the statement :
process, stdout, stderr = gs.execute('C:\Windows\System32\cmd.exe', ['/C', 'tasklist'])
See this link
I want to something like this for VBox Ubuntu client with the statement :
process, stdout, stderr = gs.execute('/bin/bash',['echo hello world'])
which returns no output.
In VBox Ubuntu client statement :
which bash
returns :
/bin/bash
And echo hello world
is executed well.
Which alternatives there might be to execute a statement in Ubuntu? Sorry if this is not the correct place to ask.
command-line bash virtualbox python
add a comment |
I do not know if AskUbuntu is the correct place to ask or Stack Overflow.
To execute a statement in Windows use : C:\Windows\System32\cmd.exe
What is the equivalent in Ubuntu? I thought it was : /bin/bash
but that does not work for me. I tried /bin/sh
and /bin/dash
( like shown here )but without result.
In Virtualbox client I want to be able to execute a statement. For this I use pyvbox which is a Python shell for the virtualbox API.
After installing execute in statement in Virtualbox Windows client is possible with the statement :
process, stdout, stderr = gs.execute('C:\Windows\System32\cmd.exe', ['/C', 'tasklist'])
See this link
I want to something like this for VBox Ubuntu client with the statement :
process, stdout, stderr = gs.execute('/bin/bash',['echo hello world'])
which returns no output.
In VBox Ubuntu client statement :
which bash
returns :
/bin/bash
And echo hello world
is executed well.
Which alternatives there might be to execute a statement in Ubuntu? Sorry if this is not the correct place to ask.
command-line bash virtualbox python
add a comment |
I do not know if AskUbuntu is the correct place to ask or Stack Overflow.
To execute a statement in Windows use : C:\Windows\System32\cmd.exe
What is the equivalent in Ubuntu? I thought it was : /bin/bash
but that does not work for me. I tried /bin/sh
and /bin/dash
( like shown here )but without result.
In Virtualbox client I want to be able to execute a statement. For this I use pyvbox which is a Python shell for the virtualbox API.
After installing execute in statement in Virtualbox Windows client is possible with the statement :
process, stdout, stderr = gs.execute('C:\Windows\System32\cmd.exe', ['/C', 'tasklist'])
See this link
I want to something like this for VBox Ubuntu client with the statement :
process, stdout, stderr = gs.execute('/bin/bash',['echo hello world'])
which returns no output.
In VBox Ubuntu client statement :
which bash
returns :
/bin/bash
And echo hello world
is executed well.
Which alternatives there might be to execute a statement in Ubuntu? Sorry if this is not the correct place to ask.
command-line bash virtualbox python
I do not know if AskUbuntu is the correct place to ask or Stack Overflow.
To execute a statement in Windows use : C:\Windows\System32\cmd.exe
What is the equivalent in Ubuntu? I thought it was : /bin/bash
but that does not work for me. I tried /bin/sh
and /bin/dash
( like shown here )but without result.
In Virtualbox client I want to be able to execute a statement. For this I use pyvbox which is a Python shell for the virtualbox API.
After installing execute in statement in Virtualbox Windows client is possible with the statement :
process, stdout, stderr = gs.execute('C:\Windows\System32\cmd.exe', ['/C', 'tasklist'])
See this link
I want to something like this for VBox Ubuntu client with the statement :
process, stdout, stderr = gs.execute('/bin/bash',['echo hello world'])
which returns no output.
In VBox Ubuntu client statement :
which bash
returns :
/bin/bash
And echo hello world
is executed well.
Which alternatives there might be to execute a statement in Ubuntu? Sorry if this is not the correct place to ask.
command-line bash virtualbox python
command-line bash virtualbox python
edited May 23 '17 at 12:39
Community♦
1
1
asked Jul 11 '14 at 12:51
BernardBernard
2222313
2222313
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
man bash
... i.e. try to adapt your code to bash -c 'echo Hello!'
Need to know more about bash?
http://tldp.org has at least two guides om bash - they will take you from a novice to an advanced level.
Thanks. I tried which raised an exception : 'Specified file was not found on guest'
– Bernard
Jul 11 '14 at 13:08
I interpret that as a problem caused by pyvbox - tryprocess, stdout, stderr = gs.execute('/bin/bash',['-c echo hello world'])
or something similar, I suspect the first arg must be kept as is. The bare bash -c call above works. Try it out.
– Hannu
Jul 11 '14 at 13:12
@Hanna. Very warm. Your suggestion did not work. But process, stdout, stderr = gs.execute('/bin/bash',['-c', 'echo hello world']) did. Thanks very much.
– Bernard
Jul 11 '14 at 13:18
add a comment |
Can you tell me the last to solve this problem? Recently, I also encountered the need to operate virtual machines on physical machines. My virtual machines are all centos systems.
New contributor
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f496451%2fexecute-a-statement-bin-bash-seems-not-to-work-in-virtualbox-client%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
man bash
... i.e. try to adapt your code to bash -c 'echo Hello!'
Need to know more about bash?
http://tldp.org has at least two guides om bash - they will take you from a novice to an advanced level.
Thanks. I tried which raised an exception : 'Specified file was not found on guest'
– Bernard
Jul 11 '14 at 13:08
I interpret that as a problem caused by pyvbox - tryprocess, stdout, stderr = gs.execute('/bin/bash',['-c echo hello world'])
or something similar, I suspect the first arg must be kept as is. The bare bash -c call above works. Try it out.
– Hannu
Jul 11 '14 at 13:12
@Hanna. Very warm. Your suggestion did not work. But process, stdout, stderr = gs.execute('/bin/bash',['-c', 'echo hello world']) did. Thanks very much.
– Bernard
Jul 11 '14 at 13:18
add a comment |
man bash
... i.e. try to adapt your code to bash -c 'echo Hello!'
Need to know more about bash?
http://tldp.org has at least two guides om bash - they will take you from a novice to an advanced level.
Thanks. I tried which raised an exception : 'Specified file was not found on guest'
– Bernard
Jul 11 '14 at 13:08
I interpret that as a problem caused by pyvbox - tryprocess, stdout, stderr = gs.execute('/bin/bash',['-c echo hello world'])
or something similar, I suspect the first arg must be kept as is. The bare bash -c call above works. Try it out.
– Hannu
Jul 11 '14 at 13:12
@Hanna. Very warm. Your suggestion did not work. But process, stdout, stderr = gs.execute('/bin/bash',['-c', 'echo hello world']) did. Thanks very much.
– Bernard
Jul 11 '14 at 13:18
add a comment |
man bash
... i.e. try to adapt your code to bash -c 'echo Hello!'
Need to know more about bash?
http://tldp.org has at least two guides om bash - they will take you from a novice to an advanced level.
man bash
... i.e. try to adapt your code to bash -c 'echo Hello!'
Need to know more about bash?
http://tldp.org has at least two guides om bash - they will take you from a novice to an advanced level.
edited Jul 13 '14 at 14:09
answered Jul 11 '14 at 13:05
HannuHannu
2,2581227
2,2581227
Thanks. I tried which raised an exception : 'Specified file was not found on guest'
– Bernard
Jul 11 '14 at 13:08
I interpret that as a problem caused by pyvbox - tryprocess, stdout, stderr = gs.execute('/bin/bash',['-c echo hello world'])
or something similar, I suspect the first arg must be kept as is. The bare bash -c call above works. Try it out.
– Hannu
Jul 11 '14 at 13:12
@Hanna. Very warm. Your suggestion did not work. But process, stdout, stderr = gs.execute('/bin/bash',['-c', 'echo hello world']) did. Thanks very much.
– Bernard
Jul 11 '14 at 13:18
add a comment |
Thanks. I tried which raised an exception : 'Specified file was not found on guest'
– Bernard
Jul 11 '14 at 13:08
I interpret that as a problem caused by pyvbox - tryprocess, stdout, stderr = gs.execute('/bin/bash',['-c echo hello world'])
or something similar, I suspect the first arg must be kept as is. The bare bash -c call above works. Try it out.
– Hannu
Jul 11 '14 at 13:12
@Hanna. Very warm. Your suggestion did not work. But process, stdout, stderr = gs.execute('/bin/bash',['-c', 'echo hello world']) did. Thanks very much.
– Bernard
Jul 11 '14 at 13:18
Thanks. I tried which raised an exception : 'Specified file was not found on guest'
– Bernard
Jul 11 '14 at 13:08
Thanks. I tried which raised an exception : 'Specified file was not found on guest'
– Bernard
Jul 11 '14 at 13:08
I interpret that as a problem caused by pyvbox - try
process, stdout, stderr = gs.execute('/bin/bash',['-c echo hello world'])
or something similar, I suspect the first arg must be kept as is. The bare bash -c call above works. Try it out.– Hannu
Jul 11 '14 at 13:12
I interpret that as a problem caused by pyvbox - try
process, stdout, stderr = gs.execute('/bin/bash',['-c echo hello world'])
or something similar, I suspect the first arg must be kept as is. The bare bash -c call above works. Try it out.– Hannu
Jul 11 '14 at 13:12
@Hanna. Very warm. Your suggestion did not work. But process, stdout, stderr = gs.execute('/bin/bash',['-c', 'echo hello world']) did. Thanks very much.
– Bernard
Jul 11 '14 at 13:18
@Hanna. Very warm. Your suggestion did not work. But process, stdout, stderr = gs.execute('/bin/bash',['-c', 'echo hello world']) did. Thanks very much.
– Bernard
Jul 11 '14 at 13:18
add a comment |
Can you tell me the last to solve this problem? Recently, I also encountered the need to operate virtual machines on physical machines. My virtual machines are all centos systems.
New contributor
add a comment |
Can you tell me the last to solve this problem? Recently, I also encountered the need to operate virtual machines on physical machines. My virtual machines are all centos systems.
New contributor
add a comment |
Can you tell me the last to solve this problem? Recently, I also encountered the need to operate virtual machines on physical machines. My virtual machines are all centos systems.
New contributor
Can you tell me the last to solve this problem? Recently, I also encountered the need to operate virtual machines on physical machines. My virtual machines are all centos systems.
New contributor
New contributor
answered 32 mins ago
lo_ongclo_ongc
1
1
New contributor
New contributor
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f496451%2fexecute-a-statement-bin-bash-seems-not-to-work-in-virtualbox-client%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown