Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
07-24-2008, 02:16 AM
|
#1
|
|
Member
Registered: Oct 2007
Posts: 160
Rep:
|
piping output of find to vim
hi
how to open a file in vim which had been found using find command.
i tried this it does not worked.
Code:
[babu@localhost thread]$ find . -name qthread.h | vi
Vim: Warning: Input is not from a terminal
Vim: Error reading input, exiting...
|
|
|
|
07-24-2008, 02:32 AM
|
#2
|
|
Senior Member
Registered: May 2004
Location: Belgium
Distribution: Debian, Slackware, Fedora
Posts: 1,111
Rep: 
|
Vi is trying to execute something in your example.
Try it like this:
|
|
|
|
07-24-2008, 02:39 AM
|
#3
|
|
Member
Registered: Oct 2007
Posts: 160
Original Poster
Rep:
|
thank u it works,
i want to do the same using pipe .whats wrong with my command.i am sending the output of left hand side command(find) as the input of right hand side command(vi).
|
|
|
|
07-24-2008, 02:57 AM
|
#4
|
|
Senior Member
Registered: May 2004
Location: Belgium
Distribution: Debian, Slackware, Fedora
Posts: 1,111
Rep: 
|
Quote:
Originally Posted by babu198649
thank u it works,
i want to do the same using pipe .whats wrong with my command.i am sending the output of left hand side command(find) as the input of right hand side command(vi).
|
You can't (well, not just like that).
Vi itself needs to communicate with a terminal, hence the error you got.
|
|
|
|
07-24-2008, 06:25 AM
|
#5
|
|
Guru
Registered: Aug 2004
Location: Brisbane
Distribution: Centos 6.4, Centos 5.9
Posts: 15,026
|
Tell us what you want to do with the file. As said, vi/vim is an interactive editor. You probably want sed (Stream EDitor).
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 09:37 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|