From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Newsgroups: gmane.lisp.guile.user Subject: Re: Shell commands with output to string Date: Tue, 22 Feb 2022 11:21:43 +0100 Message-ID: References: <1280eba0-81c0-6e7b-d512-bbd1f83a409c@posteo.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PwWvxswdxEMjDYxv" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35798"; mail-complaints-to="usenet@ciao.gmane.io" To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Tue Feb 22 11:22:22 2022 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nMSJK-00095d-1J for guile-user@m.gmane-mx.org; Tue, 22 Feb 2022 11:22:22 +0100 Original-Received: from localhost ([::1]:57776 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nMSJJ-00078c-0a for guile-user@m.gmane-mx.org; Tue, 22 Feb 2022 05:22:21 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:53506) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nMSIu-00076t-0u for guile-user@gnu.org; Tue, 22 Feb 2022 05:21:57 -0500 Original-Received: from mail.tuxteam.de ([5.199.139.25]:52366) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nMSIp-00054B-GS for guile-user@gnu.org; Tue, 22 Feb 2022 05:21:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=From:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:To:Date:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=/lO0K/RzAhbt9FLWS1Fp61Sl1FgBmNEkvWbmMQT0FdM=; b=lPRCRPDO89yknARRTHNfoCbkLC XuBnlEXkpcsLszhU5mne90dCQkbQzaHUW3Kx4LkcZ8W55/hpfMSAnalJZO/y36A07v67CPD5Ian61 TC1FXSxwizhwC3e1pIgh8dYLdiRYGLY0ENfFRwuyOK2rxmECRnkpKwzmA3JiJ92iUOayQULOGkl2i jUcXLdB8gMKtcmHsA6y9eIRCAs2hxMKMjlmV6tKA4YBzoBI1mzJHiq1lo9nSzZ/qtTjKWbh6qT9hi KhT9+o0yyzy+Fy7eVDCJDqbNUHM67G6srzaEtrM8S70wEIuyBxkx1sjoIM03QCZHwsK4xhM9QMy+8 4yFwdIZw==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.94.2) (envelope-from ) id 1nMSIh-0004Gv-Ge for guile-user@gnu.org; Tue, 22 Feb 2022 11:21:43 +0100 Content-Disposition: inline In-Reply-To: <1280eba0-81c0-6e7b-d512-bbd1f83a409c@posteo.de> Received-SPF: pass client-ip=5.199.139.25; envelope-from=tomas@tuxteam.de; helo=mail.tuxteam.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:18117 Archived-At: --PwWvxswdxEMjDYxv Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 22, 2022 at 09:38:35AM +0000, Zelphir Kaltstahl wrote: > Corrections below. >=20 > On 2/22/22 10:29, Zelphir Kaltstahl wrote: > > Hello Guile users! > >=20 > > How would I run a shell command from inside Guile and get its output as > > a string, instead of the output being outputted directly? (Guile 3.0.8) Sorry for the short answer (bad connectivity). I think you want something like `popen' (use-modules (ice-9 popen)). See the ref manual "Guile Modules" > POSIX > Pipes. Cheers --=20 t --PwWvxswdxEMjDYxv Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCYhS5MAAKCRAFyCz1etHa Rp0ZAJ9l9HjrBhvnO1CgcbOEOqEQKhzQ2wCdFN3M4sgYCPCn+MkjrMethbvj8oQ= =Cti1 -----END PGP SIGNATURE----- --PwWvxswdxEMjDYxv--