I spent a couple of hours this afternoon doing an export of the latest
OSProcess/CommandShell packages to a couple of GitHub repositories for
benefit of Pharo users.
The updates have been available for Squeak for some time, since I do all
development in Squeak and use SqueakSource as the upstream repository.
But I'm not sure that I ever bothered mentioning it on the list here.
So in case it may be of interest, here is a recently added feature that
may be of some general usefulness:
OSProcess outputOf: 'ls -lR | wc -l'
This is a convenience method that handles parsing, piping, and error handling
for a unix-style command pipeline. Both OSProcess and CommandShell must be
loaded. Any errors detected in the external commands will be displayed in a
Squeak debugger. If that happens, proceed through the debugger to obtain the
final stdout result.
OSProcess/CommandShell can be loaded with the SqueakMap package loader, or:
Installer ss project: 'OSProcess'; install: 'OSProcess'.
Installer ss project: 'CommandShell'; install: 'CommandShell'.
Dave
----- Forwarded message from "David T. Lewis" <
[hidden email]> -----
Date: Sun, 30 Aug 2020 14:38:44 -0400
From: "David T. Lewis" <
[hidden email]>
To:
[hidden email]
Subject: [Pharo-dev] OSProcess and CommandShell updated on GitHub for Pharo
These updates bring OSProcess/CommandShell up to date with the latest
development versions, and include earlier fixes for Pharo by Max Leske.
The repositories are at
https://github.com/dtlewis290/OSProcess-Tonel https://github.com/dtlewis290/CommandShell-TonelA new feature of possible interest is:
OSProcess outputOf: 'ls -lR | wc -l'
This is a convenience method that handles parsing, piping, and error handling
for a unix-style command pipeline. Both OSProcess and CommandShell must be
loaded. Any errors detected in the external commands will be displayed in a
Pharo debugger, proceed through the debugger to obtain the final stdout result.
Dave
----- End forwarded message -----