On Mon, Sep 21, 2009 at 5:44 PM, Roshan Mathews <[email protected]> wrote:
> On Mon, Sep 21, 2009 at 4:39 PM, Kapil Hari Paranjape <[email protected]> 
> wrote:
>> Perhaps you should try it and then make a pronouncement!
>>
> My bad, but I only have access to Cygwin and I tried `xargs ls' ...
> anyways this seems interesting, will check at work tomorrow.
>
This is interesting.

$ find -name "*.h" | xargs nano
Received SIGHUP or SIGTERM
<doesn't screw up anything, doesn't start>
$ find -name "*.h" | xargs emacs
<opens emacs with the files, everything ok>
$ find -name "*.h" | xargs emacs -nw
emacs: standard input is not a tty
<doesn't screw up anything, doesn't start>
$ find -name "*.h" | xargs gvim
104 files to edit
<works, exits, everything ok>
$ find -name "*.h" | xargs vi
Vim: Warning: Input is not from a terminal
104 files to edit
<exit to find shell has gone to sleep>

The issue does seem to be, as Kapil Paranjape pointed out,
that vi has it's stdin set to /dev/null which it doesn't like.

http://sial.org/howto/shell/ suggests that you can use
backticks (instead of xargs) like so:
$ vi `find -name "*.h"`

Or, just use emacs.

Roshan
_______________________________________________
To unsubscribe, email [email protected] with 
"unsubscribe <password> <address>"
in the subject or body of the message.  
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Reply via email to