Date: 6 May 2001 05:00:59 GMT From: _hate_spam_thunder7@xs4all.nl (jurriaan kalkman) To: freebsd-questions@freebsd.org Subject: Re: How do yo do that cool pipe | trick Message-ID: <slrn9f8f48.5la._hate_spam_thunder7@middle.of.nowhere> In-Reply-To: <20010505133534.30774.qmail@web10907.mail.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 5 May 2001 15:35:51 +0200, Bill Hickum <yh2789@yahoo.COM> 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: <esc>:r /etc/hosts or <esc>: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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?slrn9f8f48.5la._hate_spam_thunder7>