Article View: news.software.readers
Article #70747Re: slrn - shell command in custom_headers
From: John E. Davis
Date: Thu, 18 Jan 2001 18:18
Date: Thu, 18 Jan 2001 18:18
13 lines
1288 bytes
1288 bytes
On Thu, 18 Jan 2001 18:01:13 GMT, Renaud Colinet <rcolinet@free.invalid>
wrote:
>The tricky part is to get the output of your shell command into a
>string. S-lang seems to have a built-in 'uname', so that shouldn't be so
>hard, but I'm not sure for other commands.
You can use popen:
variable output;
() = fgets (&output, popen ("some-shell-command", "r"));
--John
Technical Details
Message-ID:
<slrn96ecs2.8b.davis@aluche.mit.edu>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!newsswitch.lcs.mit.edu!bloom-beacon.mit.edu!senator-bedfellow.mit.edu!dreaderd!not-for-mailReferences:
<slrn96e7m7.sk.neuromancer@HAL-9000.net> <JbG96.309$m%.552009@nnrp2.proxad.net>Show Full Headers
Complete Article Headers
Message-ID: <slrn96ecs2.8b.davis@aluche.mit.edu> Subject: Re: slrn - shell command in custom_headers Date: Thu, 18 Jan 2001 18:18:44 +0000 From: davis@space.mit.edu (John E. Davis) References: <slrn96e7m7.sk.neuromancer@HAL-9000.net> <JbG96.309$m%.552009@nnrp2.proxad.net> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!newsswitch.lcs.mit.edu!bloom-beacon.mit.edu!senator-bedfellow.mit.edu!dreaderd!not-for-mail Newsgroups: news.software.readers Organization: Center for Space Research Reply-To: davis@space.mit.edu User-Agent: slrn/0.9.6.4 (Linux) Lines: 12 NNTP-Posting-Host: ALUCHE.MIT.EDU X-Trace: dreaderd 979841924 470 18.75.2.45