Getting the output of a shell command

This is a discussion on Getting the output of a shell command within the Smalltalk forums in Programming Languages category; Hi there, any way to run a DOS command and getting its output in dolphin? I want to make a monitor of DDoS attacks and I need to parse the netstat too detailed output. You can imagine how much I want to use Dolphin for that instead of perl regexp and friends. thanks, Sebastian PS: using it on wine if linux or cygwin if windows...

Go Back   Application Development Forum > Programming Languages > Smalltalk

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-13-2008, 12:44 PM
Sebastian
Guest
 
Default Getting the output of a shell command

Hi there,

any way to run a DOS command and getting its output in dolphin?

I want to make a monitor of DDoS attacks and I need to parse the
netstat too detailed output. You can imagine how much I want to use
Dolphin for that instead of perl regexp and friends.

thanks,

Sebastian
PS: using it on wine if linux or cygwin if windows
Reply With Quote
  #2  
Old 08-13-2008, 02:17 PM
Peter Kenny
Guest
 
Default Re: Getting the output of a shell command


"Sebastian" <ssastre@seaswork.com.ar> wrote...
> Hi there,
>
> any way to run a DOS command and getting its output in dolphin?
>

I use Bob Jarvis's ExternalProcess goodie to run an external program under
DOS and access its output. It is very powerful and flexible, so it may be
overkill if you just want to get at stdout, but it is there and it works
without problems. See Bob's Goodies at
http://www.nls.net/mp/jarvis/bob/DolphinGoodies.htm

> PS: using it on wine if linux or cygwin if windows


Not sure about the implications of this. I just use it under Windows XP SP2.

Hope this helps

Peter Kenny


Reply With Quote
  #3  
Old 08-13-2008, 03:03 PM
Udo Schneider
Guest
 
Default Re: Getting the output of a shell command

Peter Kenny wrote:
>> any way to run a DOS command and getting its output in dolphin?
>>

> I use Bob Jarvis's ExternalProcess goodie to run an external program under
> DOS and access its output. It is very powerful and flexible, so it may be
> overkill if you just want to get at stdout, but it is there and it works
> without problems. See Bob's Goodies at
> http://www.nls.net/mp/jarvis/bob/DolphinGoodies.htm

My "US ExternakProcess Extension" might help here. It wraps Windows/CRT
streams in a way that they are accessible as regular smalltalk streams.

CU,

Udo
Reply With Quote
  #4  
Old 08-13-2008, 03:04 PM
Peter Kenny
Guest
 
Default Re: Getting the output of a shell command


"Peter Kenny" wrote...
>
> I use Bob Jarvis's ExternalProcess goodie to run an external program under
> DOS and access its output.


I should just mention that my app is still runnung under Dolphin 5.1.4, and
I see that Bob Jarvis's goodies page has not been updated since July 2004. I
see no reason why it should not work under Dolphin 6, but it may not have
been tested yet.

Peter Kenny


Reply With Quote
  #5  
Old 08-14-2008, 10:07 AM
Sebastian
Guest
 
Default Re: Getting the output of a shell command

> My "US ExternakProcess Extension" might help here. It wraps Windows/CRT
> streams in a way that they are accessible as regular smalltalk streams.
>
> CU,
>
> Udo



Hi Udo and Peter,

In windows works like a charm but ExternalProcess is unable to open
the process with the command under wine. I've done it in squeak.

Thanks for the pointers,

Sebastian
Reply With Quote
  #6  
Old 08-18-2008, 06:16 AM
Udo Schneider
Guest
 
Default Re: Getting the output of a shell command

Sebastian,

> In windows works like a charm but ExternalProcess is unable to open
> the process with the command under wine. I've done it in squeak.

Is this a non-Windows command you are trying to capture output from? I'm
asking because if is possible to capture output from a Windows console
app running in Wine.

CU,

Udo
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 09:12 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.