Samples Gallery & Reference > Utilities

Pipecom - Cross-platform Alternative to Shell by SpriggsySpriggs

(1/1)

Junior Librarian:
Pipecom - Cross-platform Alternative to Shell

Author: @SpriggsySpriggs
Source: qb64.org Forum
URL: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: ---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: ---Dim As Long exit_codeDim 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.

Navigation

[0] Message Index

Go to full version