From owner-freebsd-questions Sat May 5 22: 1:11 2001 Delivered-To: freebsd-questions@freebsd.org Received: from smtp9.xs4all.nl (smtp9.xs4all.nl [194.109.127.135]) by hub.freebsd.org (Postfix) with ESMTP id E04A937B423 for ; Sat, 5 May 2001 22:01:07 -0700 (PDT) (envelope-from _hate_spam_thunder7@xs4all.nl) Received: from list1.xs4all.nl (list1.xs4all.nl [194.109.6.52]) by smtp9.xs4all.nl (8.9.3/8.9.3) with ESMTP id HAA18052 for ; Sun, 6 May 2001 07:01:06 +0200 (CEST) Received: (from root@localhost) by list1.xs4all.nl (8.9.3/8.9.3) id HAA16239; Sun, 6 May 2001 07:01:06 +0200 (CEST) From: _hate_spam_thunder7@xs4all.nl (jurriaan kalkman) To: freebsd-questions@freebsd.org X-Via: imploder /usr/local/lib/mail/news2mail/news2mail at list1.xs4all.nl Subject: Re: How do yo do that cool pipe | trick Date: 6 May 2001 05:00:59 GMT Organization: XS4ALL Internet BV Message-ID: In-Reply-To: <20010505133534.30774.qmail@web10907.mail.yahoo.com> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 5 May 2001 15:35:51 +0200, Bill Hickum wrote: > 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 > > newgate[/etc]> vi | grep -ls hosts * > host.conf > hosts.allow > hosts.equiv > hosts.lpd > printcap > services > ex/vi: Vi's standard input and output must be a > terminal > > What's a terminal? > > I did the man pipe and man xargs but man pages aren't > any good unless you don't need them. What kind of > people write like that. > If you just want to look at hosts: less hosts or grep -ls hosts * | less If you want to use the contents of hosts in another file, email, whatever: :r /etc/hosts or :r ! grep -ls hosts * what you get out of a shell-script-pipe is read-only, so there's nothing for vi to work with. Good luck, Jurriaan -- Oh, sir, just one thing. If we should happen to tread on a mine, what do we do? ...Well, normal procedure, Lieutenant, is to jump two hundred feet in the air, and scatter yourself over a wide area. George and Edmund : Captain Cook - Somewhere in No Man's Land GNU/Linux 2.4.4 SMP/ReiserFS 2x1743 bogomips load av: 0.52 0.11 0.04 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message