Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!usc!samsung!uunet!mcsun!unido!horga!wizard!mack From: mack@wizard.ruhr.de (Jochen Erwied) Newsgroups: comp.sys.amiga.misc Subject: Re: YES: device... Message-ID: <18997d60.ARN00e6@wizard.ruhr.de> Date: 29 Jan 91 18:18:08 GMT References: <14426@chaph.usc.edu> Reply-To: mack@wizard.ruhr.de (Jochen Erwied) Followup-To: comp.sys.amiga.misc Organization: The Wizard of Yendor - Amiga-Modula-Gruppe Dortmund Lines: 42 In article <14426@chaph.usc.edu>, Alex C. Liu writes: > >I was wondering, is there some sort of YES: device on the amiga that >does something that the yes command would do on unix? Simply put, >openning a file "YES:yes" for reading would make the reader read a >bunch of "yes" or (yes:no a bunch of "no"s) Why would I want this? >Well, sometimes, when I am unzooing or unlharcing I come up with a: > zoo file exits Replace? (Yes/No/All/Quit) >and often I would like to say NO for ALL of the existing files (Not >one of the options in that small menu) And having a YES: device that >does that would do the trick. Now, if a device like that doesnt >exist, how hard would it be to write one? There _are_ options to suppress these messages: "zoo e//O" unpacks an archive with complete directory tree and without asking questions and without overwriting files "lharc -m e" does it too. (for .lzh-files) Writing a device would be a bit of work. What about using pipes? I'm using ARP and the conman-handler to get real (unnamed) pipes. The yes-program: main(argc,argv) int argc; char *argv[]; { if(argc==1) while(1) printf("y\n"); else while(1) printf("%s\n",argv[1]); } Your command would then look like yes n | zoo e// Jochen Erwied | (inside Germany) mack@wizard.ruhr.de Emil-Figge-Str. 3/005 | erwied%wastl@laura.informatik.uni-dortmund.de W-4600 Dortmund 1, FRG | +49-231-750331 (data) +49-231-756081 (voice) -----------------------+ "I'm not a number, I'm a FREE man" - "hahaha..."