[Pharo-users] Re: OSSUnixSubprocess - not getting output from a command that pipes to grep

2022-06-06 Thread Stewart MacLean
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

[Pharo-users] Re: OSSUnixSubprocess - not getting output from a command that pipes to grep

2022-06-06 Thread Yanni Chiu
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 ].

[Pharo-users] Re: OSSUnixSubprocess - not getting output from a command that pipes to grep

2022-06-06 Thread vinref
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 | ``` ```