[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: OT: xargs & vi

On Mon, Jan 07, 2002 at 04:43:47PM +0100, martin f krafft wrote:
| can anyone please explain this to me?
| seamus:/usr/local/share/phpgw# find . -name Root | xargs vi
| 221 files to edit
| Vim: Warning: Input is not from a terminal
| seamus:/usr/local/share/phpgw# vi `find . -name Root`
| 221 files to edit
| how the heck does vi get the difference between the two methods of
| calling it...

Other people have explained what happened, but not how to get where
you want to be.  For vim, at least,

find . -name Root | xargs vi -

Tell vim to read data from stdin and commands from stderr.  This is
also useful to stick the output of a command into a buffer or to use
vim as a pager.



Thy Word is a lamp unto my feet
and a light unto my path.
        Psalms 119:105

Reply to: