Path: news.daimi.aau.dk!news-feed.inet.tele.dk!bofh.vszbr.cz!newspeer.monmouth.com!news-out.internetmci.com!newsfeed.internetmci.com!204.71.1.51!spamkiller.internetmci.com!pull-feed.internetmci.com!not-for-mail From: mimichae@westmont.edu (Michael S. Michaels) Newsgroups: comp.lang.beta Subject: Re: Running a system shell command in BETA References: <349632F0.2C74EF86@westmont.edu> Reply-To: mimichae@westmont.edu Message-ID: X-Newsreader: slrn (0.9.4.3 UNIX) Lines: 26 Date: Tue, 24 Feb 1998 17:22:08 GMT NNTP-Posting-Host: pulsar.westmont.edu NNTP-Posting-Date: Tue, 24 Feb 1998 12:22:08 EST Xref: news.daimi.aau.dk comp.lang.beta:11420 Not sure if the following post made it through so I'm reposting this. Michael S. Michaels wrote: >I recently downloaded the free Personal Edition of the Mjolner BETA >system from: > > > >I have been very impressed by it and by the BETA language that it >supports. Programming in BETA is a true pleasure. > >I do have one question, however, which came up while I was translating a >script written in Python. The script reformats the output from the 'du' >command (I'm using Linux). How do you run a system shell command and >capture the output in BETA? I took a look at the 'startUnixProcess' >pattern in the 'unixinterface' library, but have yet to understand how >to use it. Am I on the right track? > >In Python, this is done using the following imperative: > > result = os.popen("du", "r").read() #capture du's output into 'result' > >Does anyone know how this would be done in BETA? > >Sincerely, > >Michael S. Michaels