command line command from pharo image
Hi, how can I perform a commandline command from within Pharo? Sabine -- View this message in context: http://forum.world.st/command-line-command-from-pharo-image-tp4727022.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
depends on the kind of command line :) the most easy way is to do something like: ./pharo Pharo.image eval "42 factorial" Esteban On Tue, Dec 3, 2013 at 2:45 PM, Sabine Knöfel <sabine.knoefel@gmail.com>wrote:
Hi,
how can I perform a commandline command from within Pharo?
Sabine
-- View this message in context: http://forum.world.st/command-line-command-from-pharo-image-tp4727022.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
I think the question was how do you do that worm within Pharo. Not Pharo from command line Uko On 03 Dec 2013, at 14:48, Esteban Lorenzano <estebanlm@gmail.com> wrote:
depends on the kind of command line :)
the most easy way is to do something like:
./pharo Pharo.image eval "42 factorial"
Esteban
On Tue, Dec 3, 2013 at 2:45 PM, Sabine Knöfel <sabine.knoefel@gmail.com> wrote: Hi,
how can I perform a commandline command from within Pharo?
Sabine
-- View this message in context: http://forum.world.st/command-line-command-from-pharo-image-tp4727022.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Hi, Uko2 is right, I want to call an os command (esteban: mongodump) from within Pharo. Sabine On Tue, Dec 3, 2013 at 2:52 PM, Uko2 [via Smalltalk] < ml-node+s1294792n4727029h94@n4.nabble.com> wrote:
I think the question was how do you do that worm *within* Pharo. Not Pharo from command line
Uko
On 03 Dec 2013, at 14:48, Esteban Lorenzano <[hidden email]<http://user/SendEmail.jtp?type=node&node=4727029&i=0>> wrote:
depends on the kind of command line :)
the most easy way is to do something like:
./pharo Pharo.image eval "42 factorial"
Esteban
On Tue, Dec 3, 2013 at 2:45 PM, Sabine Knöfel <[hidden email]<http://user/SendEmail.jtp?type=node&node=4727029&i=1>
wrote:
Hi,
how can I perform a commandline command from within Pharo?
Sabine
-- View this message in context: http://forum.world.st/command-line-command-from-pharo-image-tp4727022.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
------------------------------ If you reply to this email, your message will be added to the discussion below:
http://forum.world.st/command-line-command-from-pharo-image-tp4727022p472702... To start a new topic under Pharo Smalltalk Users, email ml-node+s1294792n1310670h65@n4.nabble.com To unsubscribe from command line command from pharo image, click here<http://forum.world.st/template/NamlServlet.jtp?macro=unsubscribe_by_code&nod...> . NAML<http://forum.world.st/template/NamlServlet.jtp?macro=macro_viewer&id=instant...>
-- View this message in context: http://forum.world.st/command-line-command-from-pharo-image-tp4727022p472703... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
In that case, wouldn't you find the corrent CommandLineHandler class and call >>activate on it? /Ryan On Tue, Dec 3, 2013 at 8:51 AM, Yuriy Tymchuk <yuriy.tymchuk@me.com> wrote:
I think the question was how do you do that worm *within* Pharo. Not Pharo from command line
Uko
On 03 Dec 2013, at 14:48, Esteban Lorenzano <estebanlm@gmail.com> wrote:
depends on the kind of command line :)
the most easy way is to do something like:
./pharo Pharo.image eval "42 factorial"
Esteban
On Tue, Dec 3, 2013 at 2:45 PM, Sabine Knöfel <sabine.knoefel@gmail.com>wrote:
Hi,
how can I perform a commandline command from within Pharo?
Sabine
-- View this message in context: http://forum.world.st/command-line-command-from-pharo-image-tp4727022.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Hi, the mailinglist is so helpful! Its really great! CommandShell is my solution. Thanks! Sabine On Tue, Dec 3, 2013 at 3:00 PM, Sergi Reyner [via Smalltalk] < ml-node+s1294792n4727033h18@n4.nabble.com> wrote:
2013/12/3 Sabine Knöfel <[hidden email]<http://user/SendEmail.jtp?type=node&node=4727033&i=0>
Hi,
how can I perform a commandline command from within Pharo?
Check OSProcess and CommandShell.
Cheers, Sergi
------------------------------ If you reply to this email, your message will be added to the discussion below:
http://forum.world.st/command-line-command-from-pharo-image-tp4727022p472703... To start a new topic under Pharo Smalltalk Users, email ml-node+s1294792n1310670h65@n4.nabble.com To unsubscribe from command line command from pharo image, click here<http://forum.world.st/template/NamlServlet.jtp?macro=unsubscribe_by_code&nod...> . NAML<http://forum.world.st/template/NamlServlet.jtp?macro=macro_viewer&id=instant...>
-- View this message in context: http://forum.world.st/command-line-command-from-pharo-image-tp4727022p472704... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
On 03 Dec 2013, at 15:26, Sabine Knöfel <sabine.knoefel@gmail.com> wrote:
Hi,
the mailinglist is so helpful! Its really great!
But itâs not well indexable and does not provide quality information about data. Thatâs why I encourage people to use Stack Overflow
CommandShell is my solution.
Thanks! Sabine
On Tue, Dec 3, 2013 at 3:00 PM, Sergi Reyner [via Smalltalk] <[hidden email]> wrote: 2013/12/3 Sabine Knöfel <[hidden email]>
Hi,
how can I perform a commandline command from within Pharo?
Check OSProcess and CommandShell.
Cheers, Sergi
If you reply to this email, your message will be added to the discussion below: http://forum.world.st/command-line-command-from-pharo-image-tp4727022p472703... To start a new topic under Pharo Smalltalk Users, email [hidden email] To unsubscribe from command line command from pharo image, click here. NAML
View this message in context: Re: command line command from pharo image Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
ah :) then you need OSProcess. and I do not remember exactly how it was, but something like this: OSProcess command: 'mycommand with parameters'. cheers, Esteban On Tue, Dec 3, 2013 at 3:29 PM, Yuriy Tymchuk <yuriy.tymchuk@me.com> wrote:
On 03 Dec 2013, at 15:26, Sabine Knöfel <sabine.knoefel@gmail.com> wrote:
Hi,
the mailinglist is so helpful! Its really great!
But itâs not well indexable and does not provide quality information about data. Thatâs why I encourage people to use Stack Overflow
CommandShell is my solution.
Thanks! Sabine
On Tue, Dec 3, 2013 at 3:00 PM, Sergi Reyner [via Smalltalk] <[hidden email]> wrote:
2013/12/3 Sabine Knöfel <[hidden email]<http://user/SendEmail.jtp?type=node&node=4727033&i=0>
Hi,
how can I perform a commandline command from within Pharo?
Check OSProcess and CommandShell.
Cheers, Sergi
------------------------------ If you reply to this email, your message will be added to the discussion below:
http://forum.world.st/command-line-command-from-pharo-image-tp4727022p472703... To start a new topic under Pharo Smalltalk Users, email [hidden email] To unsubscribe from command line command from pharo image, click here. NAML<http://forum.world.st/template/NamlServlet.jtp?macro=macro_viewer&id=instant...>
------------------------------ View this message in context: Re: command line command from pharo image<http://forum.world.st/command-line-command-from-pharo-image-tp4727022p472704...> Sent from the Pharo Smalltalk Users mailing list archive<http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html>at Nabble.com.
Hi Esteban, yes, like this: OSProcess thisOSProcess command: ('{1}mongodump --out {2}' format: { RKAConfiguration databaseUtilsPath. (RKAConfiguration databaseBackupPath )}). Cheers Sabine On Tue, Dec 3, 2013 at 4:28 PM, EstebanLM [via Smalltalk] < ml-node+s1294792n4727066h41@n4.nabble.com> wrote:
ah :)
then you need OSProcess.
and I do not remember exactly how it was, but something like this:
OSProcess command: 'mycommand with parameters'.
cheers, Esteban
On Tue, Dec 3, 2013 at 3:29 PM, Yuriy Tymchuk <[hidden email]<http://user/SendEmail.jtp?type=node&node=4727066&i=0>
wrote:
On 03 Dec 2013, at 15:26, Sabine Knöfel <[hidden email]<http://user/SendEmail.jtp?type=node&node=4727066&i=1>> wrote:
Hi,
the mailinglist is so helpful! Its really great!
But itâs not well indexable and does not provide quality information about data. Thatâs why I encourage people to use Stack Overflow
CommandShell is my solution.
Thanks! Sabine
On Tue, Dec 3, 2013 at 3:00 PM, Sergi Reyner [via Smalltalk] <[hidden email]> wrote:
2013/12/3 Sabine Knöfel <[hidden email]<http://user/SendEmail.jtp?type=node&node=4727033&i=0>
Hi,
how can I perform a commandline command from within Pharo?
Check OSProcess and CommandShell.
Cheers, Sergi
------------------------------ If you reply to this email, your message will be added to the discussion below:
http://forum.world.st/command-line-command-from-pharo-image-tp4727022p472703... To start a new topic under Pharo Smalltalk Users, email [hidden email] To unsubscribe from command line command from pharo image, click here. NAML<http://forum.world.st/template/NamlServlet.jtp?macro=macro_viewer&id=instant...>
------------------------------ View this message in context: Re: command line command from pharo image<http://forum.world.st/command-line-command-from-pharo-image-tp4727022p472704...> Sent from the Pharo Smalltalk Users mailing list archive<http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html>at Nabble.com.
------------------------------ If you reply to this email, your message will be added to the discussion below:
http://forum.world.st/command-line-command-from-pharo-image-tp4727022p472706... To start a new topic under Pharo Smalltalk Users, email ml-node+s1294792n1310670h65@n4.nabble.com To unsubscribe from command line command from pharo image, click here<http://forum.world.st/template/NamlServlet.jtp?macro=unsubscribe_by_code&nod...> . NAML<http://forum.world.st/template/NamlServlet.jtp?macro=macro_viewer&id=instant...>
-- View this message in context: http://forum.world.st/command-line-command-from-pharo-image-tp4727022p472706... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Sabine Knöfel wrote
OSProcess thisOSProcess
You can remove the send of #thisOSProcess and it will still work. Also, if you don't care about output, you can use NB without installing anything. In Pharo 3.0, it works on Windows, will work on Mac with Igor's latest changes... not sure about Linux... HTH ----- Cheers, Sean -- View this message in context: http://forum.world.st/command-line-command-from-pharo-image-tp4727022p472709... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Hi Sean, thanks. I need it now, on Pharo 2.0 but I will change it when I move to 3.0. Which is the Class and the message in NB then? Sabine On Tue, Dec 3, 2013 at 5:40 PM, Sean P. DeNigris [via Smalltalk] < ml-node+s1294792n4727098h33@n4.nabble.com> wrote:
Sabine Knöfel wrote OSProcess thisOSProcess
You can remove the send of #thisOSProcess and it will still work. Also, if you don't care about output, you can use NB without installing anything. In Pharo 3.0, it works on Windows, will work on Mac with Igor's latest changes... not sure about Linux...
HTH Cheers, Sean
------------------------------ If you reply to this email, your message will be added to the discussion below:
http://forum.world.st/command-line-command-from-pharo-image-tp4727022p472709... To start a new topic under Pharo Smalltalk Users, email ml-node+s1294792n1310670h65@n4.nabble.com To unsubscribe from command line command from pharo image, click here<http://forum.world.st/template/NamlServlet.jtp?macro=unsubscribe_by_code&nod...> . NAML<http://forum.world.st/template/NamlServlet.jtp?macro=macro_viewer&id=instant...>
-- View this message in context: http://forum.world.st/command-line-command-from-pharo-image-tp4727022p472731... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Sabine Knöfel wrote
Which is the Class and the message in NB then?
not sure which class and on holidays with no computer :) the Mac message is #run: which wraps system in libc, and the Windows version, which I haven't committed yet is #winExec:show which wraps WinExec. HTH ----- Cheers, Sean -- View this message in context: http://forum.world.st/command-line-command-from-pharo-image-tp4727022p472770... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
participants (6)
-
Esteban Lorenzano -
Ryan Bell -
Sabine Knöfel -
Sean P. DeNigris -
Sergi Reyner -
Yuriy Tymchuk