Communicate with Terminal or Network Utility

andgu's icon

Hello Everybody,

I am using Mac OsX, I need to get informations in Max coming from Terminal or Network Utility. In particular I need to import in Max data derived from a 'ping' done between two computers. At the same time I would like to know if it is possible to send commands from Max to the terminal, again I would like to do a 'ping' from inside Max.

Thanks.

pdelges's icon
andgu's icon

Great! Exactly what I needed!

I have another question now, It is quite simple I think, but I just do not know the object, How do you cut messages where you have some contents that you know always what is and other that you don't. I am going to do an example to support my poor english and explanation abilities:

"round-trip min/avg/max/stddev = 96.480/97.880/99.028/0.586 ms"; ----> this is the message.

I know that: " "round-trip min/avg/max/stddev = " will always be like this.

The numbers that come later instead will always have that format but with different values always separated by a "/"

It has to be noted that I do not know the actual length of the number.

Thanks.

Ad.'s icon

not beautiful but it should do the job:

I'm sure Patrick will find a regexp's beautiful solution to do that :)

Max Patch
Copy patch and select New From Clipboard in Max.

Ad.

andgu's icon

Thanks, but my problem is inverse.

Max Patch
Copy patch and select New From Clipboard in Max.

This is a part of the patch in order to show the problem. It is the first time I share a patch in this way, so I hope I did well.

Ad.'s icon

please compy compressed to post the patch
.Ad

andgu's icon

I edited the post, is it ok now?

Ad.'s icon

Yes it is !
regexp is your friend:

Max Patch
Copy patch and select New From Clipboard in Max.

andgu's icon

Thanks,
for both answers!
Just a curiosity, in the "vanille béchamel" patch the message is reduced to - 1.908/2.302/4.053/0.466 ms - , how do you take from there all the single values? There is any other way to do it apart from regexp, I want to expand my Max knowledge!