Lets say I have a file called file.txt. In it is a name of a file that I want to edit with vi. I want to do something like this so that I can edit the file:
cat file.txt | vi
However, that doesn't work. How can it be done?
To clarify things:
Here are the contents of file.txt:
textfile
So I want to somehow send the contents of file.txt to vi so that the same thing will happen as when typing vi textfile.
The contents of file.txt can change. I want vi to edit whatever file is listed in file.txt.
vi file.txt. Is there something more advanced you're trying to do? – camster342 May 31 '11 at 5:45xclipand then usexclip -oto access the clipboard on the shell in x11. just in case you need to replacepbpaste... – akira May 31 '11 at 7:07