Linux - NewbieThis 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.
I'm using SuSE 8 ES and am new to shell scripting and have created a script to locate certain files and output their relative path and filename. It works well, my script is called g -
for file in `cat filelist`
do
find ./ -name $file | xargs grep -l 'Mystring'
done
I now want to output these filenames into vi to do a multiple edit so I do -
./g | xargs vi
this does some strange stuff, vi behaves 'funny' like it lets me :n round the files but then when I go back with :e# they aren't there plus when I quit vi my terminal session is totally messed up with double-echoed prompts etc
I would put it in a script but this question is killing me. If you have a script, if you do a !script in vi it show the output on the screen. There has to be a vi command to take the output of a script/command and insert it at the end of the current cursor position. It seems like i have heard of it but can't locate it at the moment.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.