<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Em 19-11-2010 15:22, Casimiro de Almeida Barreto escreveu:
<blockquote cite="mid:4CE6B271.1010404@gmail.com" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
Em 19-11-2010 15:00, Mike Hales escreveu:
<blockquote
cite="mid:AANLkTikN9D82sHPsO920R9=+Npkw69caHSW1a-UMLWw9@mail.gmail.com"
type="cite">I must be missing something obvious, but how can I
get the results of executing an external command.
<div><br>
</div>
<div>OSProcess command: 'ls /etc'</div>
</blockquote>
Try:<br>
<br>
| pc1 |<br>
<br>
pc1 := (PipeableOSProcess command: 'ls -l' ) output.<br>
<br>
Transcript show: pc1. <br>
</blockquote>
Oooopsss... error:<br>
<br>
Transcript show: pc1 upToEnd.<br>
<br>
Or else:<br>
<br>
Transcript show: (PipeableOSProcess command: 'ls -l') upToEnd;
cr.<br>
<blockquote cite="mid:4CE6B271.1010404@gmail.com" type="cite">
<blockquote
cite="mid:AANLkTikN9D82sHPsO920R9=+Npkw69caHSW1a-UMLWw9@mail.gmail.com"
type="cite">
<div><br>
</div>
<div>returns me an ExternalUnixProcess. I just want a string of
the command results. This seems to basic to be hard, but I'm
stumped. In VisualWorks and GemStone this is just a one liner.</div>
<div><br>
</div>
<div>Thanks,</div>
<div><br>
</div>
<div>Mike</div>
<div><br>
</div>
<pre wrap=""><fieldset class="mimeAttachmentHeader"></fieldset>
</pre>
</blockquote>
<br>
</blockquote>
<br>
<br>
</body>
</html>