Article View: news.software.readers
Article #86519Re: [slrn][s-lang] Redirecting Output from an external Program into an array
From: Black Baptist
Date: Thu, 01 Nov 2001 04:06
Date: Thu, 01 Nov 2001 04:06
26 lines
2139 bytes
2139 bytes
In news.software.readers, you mumbled on 05 Oct 2001:
>On 04 Oct 2001 21:34:43 GMT, John E. Davis
><davis@space.mit.edu> wrote:
>> On 4 Oct 2001 16:49:58 GMT, Tilman Linneweh <tilman+0105@arved.de>
>>>Ist there a possibility to get the output of a command, eg. ls into an
>>>array?
>>
>> You can use the popen function. If you want a list of files in a
>> directory, use the listdir function.
>>
>Someone pointed this out to me, once:
>
> xface_fp = popen ("cat /home/jurriaan/News/hdr_xface | view-x-face", "r");
> if (xface_fp == NULL) return;
> popup_window ("X-Face:", strjoin (fgetslines(xface_fp), ""));
> () = pclose (xface_fp);
>
>very elegant, I'm still impressed.
>
>Good luck,
>Jurriaan
Flies don't eat shit the larvae or eggs *aka* maggots* that the flies emmbed
in the shit do.
Technical Details
Message-ID:
<Xns914C12097EF7atthechurchdotcom@198.164.200.20>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!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!news.gtei.net!nf3.bellglobal.com!news-nb00s0.nbnet.nb.ca!not-for-mailReferences:
<slrn9rp4rf.2ol0.tilman+0105@tl.kom.tuwien.ac.at> <slrn9rplfi.bp2.davis@aluche.mit.edu> <slrn9rqet7.42n.no_spam_here@middle.of.nowhere>Show Full Headers
Complete Article Headers
Message-ID: <Xns914C12097EF7atthechurchdotcom@198.164.200.20>
Subject: Re: [slrn][s-lang] Redirecting Output from an external Program into an array
Date: Thu, 01 Nov 2001 04:06:28 GMT
From: Black Baptist <pray@the.church.com>
References: <slrn9rp4rf.2ol0.tilman+0105@tl.kom.tuwien.ac.at> <slrn9rplfi.bp2.davis@aluche.mit.edu> <slrn9rqet7.42n.no_spam_here@middle.of.nowhere>
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!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!news.gtei.net!nf3.bellglobal.com!news-nb00s0.nbnet.nb.ca!not-for-mail
Newsgroups: news.software.readers
Organization: Sermon on the amount
User-Agent: Xnews/4.06.22
X-face: *y<nnds}Z=aA%X=Ae^Us${O5$`r*`]~T9aPM)V3o,[}a=JHO[nK"lC|l5C-(Tvm@"]Z}-s,n9F=5/q4q{|/mb9m0-h'W24,PF)F-Lx]PC|Ych~'i{YzGVR[9?:O[{]IHS[@.DF{iHb.4h2_DP($eO!#_*f%pmaP2t<\-|I
Lines: 25
NNTP-Posting-Host: 142.166.196.202
X-Complaints-To: abuse@nbnet.nb.ca
X-Trace: news-nb00s0.nbnet.nb.ca 1004587588 142.166.196.202 (Thu, 01 Nov 2001 00:06:28 AST)
NNTP-Posting-Date: Thu, 01 Nov 2001 00:06:28 AST