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:
So I want to somehow send the contents of file.txt to vi so that the same thing will happen as when typing
The contents of file.txt can change. I want vi to edit whatever file is listed in file.txt.