delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/01/14/16:28:53

From: "DIAMOND Mark" <noname AT noname DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Something unusual about cat
Date: Fri, 14 Jan 2000 16:45:06 +0800
Organization: The University of Western Australia
Lines: 29
Message-ID: <85mnn0$uc1$1@enyo.uwa.edu.au>
NNTP-Posting-Host: pc60.psy.uwa.edu.au
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

I recently installed many of the djgpp v2gnu routines on a machine I use. I
have been delighted with them, but am puzzled by something...

I use Mathematica (the Wolfram package) running under Win-95. Mathematica
allows one to read data through a pipe or shell command using
    ReadList["!comand1 files | command2 ...."]

so that the standard output from the command is taken as the input to
Mathematica. Whenever cat (GNU textutils 1.22) is the last command in piping
process, or is the only command, no input is read into Mathematica. A
failure example is

ReadList["!cat file1 file2"]

and yet if I use "sed" (GNU sed version 3.02) to do nothing more than put
the standard input on the standard output, as in

ReadList["!cat file1 file2" | sed -n -e p "]

everything is OK and file1 and file2 are concatenated together and become
the input for Mathematica.

Can anyone suggest what might be going on?






- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019