Hi,
I have a command that works fine in terminal, and I'm able to retrieve the
output using OSUnixSubprocess.
However, when I grep the output in the command, I don't receive any output
from OSUnixSubprocess.
So I get output from:
"/Applications/Logic Pro X.app/Contents/MacOS/Logic Pro X" 2>&1
b
Hi
I tried something similar on (X)ubuntu using this:
```
OSSUnixSubprocess new
```
```
command: '/bin/ls';
```
```
arguments: #('-la' '/tmp/' '|' '/usr/bin/grep unix');
```
```
redirectStdout;
```
```
runAndWaitOnExitDo: [ :process :outString |
```
```
The equivalent of running in a Terminal is to run it in a shell. Try the
following code:
OSSUnixSubprocess new
command: '/bin/bash';
arguments: #('-c' 'ls /');
redirectStdout;
runAndWaitOnExitDo: [ :process :outString |
outString inspect
].
Hi Yanni,
Thanks for this. Actually I discovered the equivalent by using
shellCommand: instead of command:.
What an excellent utility!
Cheers,
Stewart
On Tue, Jun 7, 2022 at 3:12 AM Yanni Chiu wrote:
> The equivalent of running in a Terminal is to run it in a shell. Try the
> following code: