tenaglia@mis.mcw.edu ("Chris Tenaglia - 257-8765") (09/25/90)
MSDOS does have pipes, but they're implemented differently than unix. MSDOS does it by generating scratch files. One can actually do a DIR|SORT or DIR | ICONX PROG. Inside icon one can issue system("dir >_dir.tmp") and then infile:=open("_dir.tmp") for subsequent processing. It also uses a little more memory when using the system command. I'd sure like to know how the MAC does it too. Is there a difference between a MAC with Multifinder and one with MPW? Chris Tenaglia (System Manager) Medical College of Wisconsin 8701 W. Watertown Plank Rd. Milwaukee, WI 53226 (414)257-8765 tenaglia@mis.mcw.edu, mcwmis!tenaglia
goer@quads.uchicago.edu (Richard L. Goerwitz) (09/25/90)
Tenaglia@mis.mcw.edu ("Chris Tenaglia - 257-8765") writes: >MSDOS does have pipes, but they're implemented differently than unix... This was in reference to my question about what people do to get direc- tory listings on systems that don't support pipes. I guess what I meant to say was, "How do people get directory listings from within Icon on systems that don't implement the "p" option for open() (i.e. do 'real' pipes)?" I'd be afraid to try to get a directory listing from Icon running under MS-DOS using intermediate files because you can't always count on 1) having enough free memory to do the system() function given Icon's size, and 2) writing to disc introduces yet another level of indirec- tion, and hence the possibility of many more errors (not enough disc space, clobbering a previously existing tempfile, not being able to write to the current directory, and not having a standard place for temp files). I'm searching for an answer to the dirlist from Icon problem because I want to implement an indexing program in such a way that it can be moved from Unix to Xenix to MS-DOS (others?) as easily as possible. Part of the indexing procedure is to look at all file of a specified type in a specified location. This involves finding a portable way of getting a directory listing.... -Richard
ergo@netcom.UUCP (Isaac Rabinovitch) (09/26/90)
In <0093D32B5856BB80.204002AD@mis.mcw.edu> tenaglia@mis.mcw.edu ("Chris Tenaglia - 257-8765") writes: >MSDOS does have pipes, but they're implemented differently than unix. MSDOS >does it by generating scratch files. One can actually do a DIR|SORT or >DIR | ICONX PROG. Inside icon one can issue system("dir >_dir.tmp") and >then infile:=open("_dir.tmp") for subsequent processing. It also uses a >little more memory when using the system command. Those are *not* pipes. They are *called* pipes, but what they really are is a shorthand for specifying temporary files. If they were pipes, they would allow the two programs to execute concurrently, and there would be no question of the "pipe" filling up the rest of the disk volume. As it is, each program in the pipeline has to finish executing before the next can even start. This makes for a lot of inefficiency. MS made it *look* like Unix commands like "find ... | grep ... | zoo ..." also work under MS-DOS. But for all practical purposes, they do not. -- ergo@netcom.uucp Isaac Rabinovitch {apple,amdahl,claris}!netcom!ergo Silicon Valley, CA Collins's Law: If you can't make a mistake, you can't make anything. Corollaries ("Rabinovitch's Rules of Sane Dialogue"): 1. Everybody who matters is stupid now and then. 2. If I'm being stupid, that's my problem. 3. If my being stupid makes you stupid, that's your problem. 4. If you think you're never stupid, boy are you stupid!