From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gatech.edu (gatech.edu [130.207.244.244]) by werple.mira.net.au (8.6.12/8.6.9) with SMTP id CAA24455 for ; Fri, 30 Jun 1995 02:47:10 +1000 Received: from math (math.skiles.gatech.edu) by gatech.edu with SMTP id AA21722 (5.65c/Gatech-10.0-IDA for ); Thu, 29 Jun 1995 12:42:37 -0400 Received: by math (5.x/SMI-SVR4) id AA13805; Thu, 29 Jun 1995 12:39:17 -0400 Old-Return-Path: Resent-Date: Thu, 29 Jun 95 17:33:40 +0100 Old-Return-Path: Message-Id: <10428.9506291633@pyro.swan.ac.uk> To: zsh-users@math.gatech.edu (Zsh users list) Subject: Re: how to get standard output used in command line editor? In-Reply-To: "unpingco@ece.ucsd.edu"'s message of "Thu, 29 Jun 95 08:58:18 PDT." <9506291558.AA02960@sunshine.ucsd.edu> Date: Thu, 29 Jun 95 17:33:40 +0100 From: P.Stephenson@swansea.ac.uk X-Mts: smtp Resent-Message-Id: <"M6RXE.0.oM3.LNjyl"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/36 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu unpingco@ece.ucsd.edu wrote: > Hi, > > Often, I run commands like > > find . -name 'hey' -print > > and I get a list of files I'd like to apply various commands to. > > Is there a way to use fc to edit the list generated by the find command > and then use the newly edited list as a command? Probably the neatest way (it doesn't require any editors) is print -z "$(find . -name 'hey' -print)" (double quotes necessary) which sticks the output straight into the multi-line buffer, so you can edit the list and the whole lot will be executed when you hit return. If you need an external editor, it doesn't look like fc will help from reading the manual page --- it doesn't seem to interact directly either with the line editor or even with standard input: something like you're original thought is probably necessary. -- Peter Stephenson Tel: +44 1792 205678 extn. 4461 WWW: http://python.swan.ac.uk/~pypeters/ Fax: +44 1792 295324 Department of Physics, University of Wales, Swansea, Singleton Park, Swansea, SA2 8PP, U.K.