Execute a statement /bin/bash seems not to work in Virtualbox client
.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 |
1 Answer
1
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 |
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
1 Answer
1
active
oldest
votes
1 Answer
1
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 |
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