From owner-freebsd-questions Sat May 5 7: 1: 2 2001 Delivered-To: freebsd-questions@freebsd.org Received: from skippyii.compar.com (mail.compar.com [216.208.38.130]) by hub.freebsd.org (Postfix) with ESMTP id DB87E37B422 for ; Sat, 5 May 2001 07:00:58 -0700 (PDT) (envelope-from matt@gsicomp.on.ca) Received: from hermes (HSE-Toronto-ppp213450.sympatico.ca [64.228.153.241]) by skippyii.compar.com (8.11.3/8.11.3) with SMTP id f45E5o273775; Sat, 5 May 2001 10:05:50 -0400 (EDT) (envelope-from matt@gsicomp.on.ca) Message-ID: <003a01c0d56a$fbd342f0$1200a8c0@gsicomp.on.ca> From: "Matthew Emmerton" To: "Bill Hickum" , References: <20010505133534.30774.qmail@web10907.mail.yahoo.com> Subject: Re: How do yo do that cool pipe | trick Date: Sat, 5 May 2001 09:55:00 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > It doesn't work like I think it's going to. > > newgate[/etc]> grep -ls hosts * | vi > ex/vi: Vi's standard input and output must be a > terminal I'm not sure what you're trying to do, but I think this is what you want to do: ls | grep hosts > /tmp/output vi /tmp/output vi is an editor, and can only work on files. You can't pipe stuff to/from vi. > What's a terminal? A fancy historical name for a keyboard/display combo. -- Matt Emmerton To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message