Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!rochester!pt!spice.cs.cmu.edu!mjp From: mjp@spice.cs.cmu.edu (Michael Portuesi) Newsgroups: comp.sys.amiga Subject: Re: AmigaDOS script hacking: flames Message-ID: <1251@spice.cs.cmu.edu> Date: Fri, 31-Jul-87 13:28:06 EDT Article-I.D.: spice.1251 Posted: Fri Jul 31 13:28:06 1987 Date-Received: Sun, 2-Aug-87 01:40:58 EDT Reply-To: mjp@spice.cs.cmu.edu (Michael Portuesi) Organization: Carnegie-Mellon University, CS/RI Lines: 59 Keywords: mwm@eris.BERKELEY.EDU (Mike (My watch has windows) Meyer) writes: > I had similar problems. LIST gives me tabs, but SORT didn't believe in > them, and would only sort on a specific *character* column. So I wrote > a quickie detaber. No biggie. > Uh, I didn't have that kind of problem. Then again, I didn't try to > make echo do something it wasn't intended to do. I used edit to create > the multi-line edit script. Worked like a charm. I yanked those two out quotes of context, but for my purpose it doesn't matter. My goal was to create a self-contained CLI script that could do its work without external files or programs that I had written. All I wanted to depend on was the stuff that came with the Workbench disk. (Remember, this was half experiment, half practical idea). Is there a way to make EDIT create a multi-line edit script without using an external file? Could you illustrate? BTW, "intending" a command to be used for a specific purpose merely cuts down on the utility of the system as a whole, as it limits the way individual pieces can be combined. > I don't agree. Edit is a *far* better stream editor than Unix ed. For > anything complicated, it's better than sed. The builtin ability > to loop, as opposed to the "all commands on every line" of sed is a > win. [Warning: the abilities of awk have kept me from really learning > the magic of sed.] Edit isn't an awk, but it's fairly powerfull. Okay, the ability to loop a sequence of instructions is a big win in EDIT. But a few things I could wish for are: * The ability to search for *expressions*, rather than character strings * Some sort of temporary storage, analogous to the TECO Q-register, that can be used to hold text or other information * The ability to use text extracted from the current line as a parameter for a subsequent command. Temporary storage can be simulated using temporary files (thank GOD for ramdisks), but there is no way to emulate this feature with EDIT (well, maybe there is, but it's complicated enough to be not worth the trouble) > Also make *sure* you've got a pipe: driver. Thanks for the advice. If something useful comes of this, I'll share it with everyone. --M -- Mike Portuesi / Carnegie-Mellon University Computer Science Department ARPA: mjp@spice.cs.cmu.edu UUCP: {backbone-site}!spice.cs.cmu.edu!mjp BITNET: rainwalker@drycas (a uVax-1 run by CMU Computer Club...tons o' fun) "Paradise is exactly like where you are right now...only much, much better" --Laurie Anderson, "Lanugage is a Virus"