Message Boards Message Boards

2
|
15490 Views
|
16 Replies
|
7 Total Likes
View groups...
Share
Share this post:

RunProcess issues

Posted 9 years ago
POSTED BY: Tiago Castro
16 Replies
Posted 9 years ago

What is the output of FileExistsQ["C:\Windows\system32\netstat.exe"] for your system? I expect it to return true if the file exists.

POSTED BY: Updating Name
In[2]:= FileExistsQ["C:\\windows\\system32\\netstat.exe"]
Out[2]= True

In[3]:= FileExistsQ[FileNameJoin[{"C:", "windows", "system32", "netstat.exe"}]]
Out[3]= True
POSTED BY: Udo Krause

Here it does not

enter image description here

... possibly the problem is the account owner name bärbel (has an umlaut) or something like that.

By the way, the Enviroment works

enter image description here

Thank you for checking it again, Rolf.

POSTED BY: Udo Krause

Works, kind of, for me:

StringReplace[#, "\r\n" -> "\n"] &@
 ("StandardError" /. RunProcess[{"netstat", "-h"}])
POSTED BY: Rolf Mertig
POSTED BY: Udo Krause
Posted 9 years ago

Hi all, Can you help me? I need to call a FORTRAN program recursively to my notebook. Do you have any suggestions on how to do that aside RunProcess?

Cheers, -T.C.

POSTED BY: Tiago Castro
POSTED BY: Rolf Mertig
Posted 9 years ago

It doesn't run forever for me (Windows 7, Mathematica 10.1):

<|"ExitCode" -> 0, "StandardOutput" -> "

  Pinging www.google.com [74.125.239.112] with 32 bytes of data:

  Reply from 74.125.239.112: bytes=32 time=26ms TTL=46

  Reply from 74.125.239.112: bytes=32 time=6ms TTL=46

  Reply from 74.125.239.112: bytes=32 time=4ms TTL=46

  Reply from 74.125.239.112: bytes=32 time=31ms TTL=46



  Ping statistics for 74.125.239.112:

      Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

  Approximate round trip times in milli-seconds:

      Minimum = 4ms, Maximum = 31ms, Average = 16ms

  ", "StandardError" -> ""|>
POSTED BY: Jim Baldwin
Posted 9 years ago

www.google.com is an argument to ping so according to the online documentation you'd need the following:

RunProcess[{"ping", "www.google.com"}]
POSTED BY: Jim Baldwin

Thanks, Jim, this seems to be correct but runs forever with no stop. This is probably because pinging is a continues operation till stopped? Daniel any insights?

POSTED BY: Marina Shchitova

Is RunProcess something like running system commands from terminal on Mac ? If yes - why

RunProcess["ping www.google.com"]

won't run ?

POSTED BY: Marina Shchitova
Posted 9 years ago

Thank you, let's see what they get. If working properly RunProcess is awesome.

POSTED BY: Tiago Castro
Posted 9 years ago

Hello Daniel, thank you for replying. I attached a simple notebook that reproduce the problem. It's even worst than I first said, because now I see that help stops working too.

Cheers, -T.C.

Attachments:
POSTED BY: Tiago Castro

Thank you. I have learned that the issue is under active investigation. I added a note to the bug report about testing with the notebook you sent.

POSTED BY: Daniel Lichtblau

Do you have a specific set of examples that will replicate the problem?

POSTED BY: Daniel Lichtblau
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract