Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
493 posts
|
Hi,
how can I perform a commandline command from within Pharo? Sabine |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
6187 posts
|
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]> wrote: Hi, |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
1537 posts
|
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]> wrote:
... [show rest of quote] |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
493 posts
|
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] <[hidden email]> wrote: I think the question was how do you do that worm within Pharo. Not Pharo from command line ... [show rest of quote] |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
3 posts
|
In reply to this post by Uko2
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 <[hidden email]> wrote:
... [show rest of quote] |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
123 posts
|
In reply to this post by Sabine M.
2013/12/3 Sabine Knöfel <[hidden email]> Hi, Check OSProcess and CommandShell. Cheers, Sergi |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
493 posts
|
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] <[hidden email]> wrote:
... [show rest of quote] |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
1537 posts
|
On 03 Dec 2013, at 15:26, Sabine Knöfel <[hidden email]> wrote:
But it’s not well indexable and does not provide quality information about data. That’s why I encourage people to use Stack Overflow
... [show rest of quote] |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
6187 posts
|
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]> wrote:
... [show rest of quote] |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
493 posts
|
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] <[hidden email]> wrote:
... [show rest of quote] |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
5777 posts
|
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 |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
493 posts
|
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] <[hidden email]> wrote: 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... ... [show rest of quote] |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
5777 posts
|
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 |
Free forum by Nabble | Edit this page |