Text Only
|
Text with Attachments
QB64.org Forum
Samples Gallery & Reference => Utilities => Topic started by: Junior Librarian on July 31, 2021, 06:15:10 am
Title:
Pipecom - Cross-platform Alternative to Shell by SpriggsySpriggs
Post by:
Junior Librarian
on
July 31, 2021, 06:15:10 am
Pipecom - Cross-platform Alternative to Shell
Author:
@SpriggsySpriggs
Source: qb64.org Forum
URL:https://www.qb64.org/forum/index.php?topic=3641.msg129938#msg129938 (https://www.qb64.org/forum/index.php?topic=3641.msg129938#msg129938)
Version: Visit author's URL
Tags: [OS information]
Description:
pipecom is a cross-platform utility for directly obtaining console output in Windows, Mac, and Linux. Previously, one would need to use files.
There are 2 versions.
Basic usage for returning back console output as a string only:
Code: QB64:
[Select]
MyOSInquiry$
=
pipecom_lite
(
"OS line command"
)
As expected from "lite", this just returns the answer as a string.
Usage for returning back stdout, stderr, and exit codes:
Code: QB64:
[Select]
Dim
As
Long
exit_code
Dim
As
String
stdout
,
stderrexit_code
=
pipecom
(
"dir /b *.bas"
,
stdout
,
stderr
)
'print or manipulate values as you see fit
Note: Code posted here would be redundant and not up-to-date . The author is continuously making updates for improvement.
Go to the URL above.
Text Only
|
Text with Attachments