💻 Software
How to use a pipe to edit a file with vi
Fresh7 days ago
Mar 15, 20266478 viewsConfidence Score0%
0%
Problem
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: 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 o…
Error Output
cat file.txt | vi
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Canonical Fix
Unverified Fix
New Fix – Awaiting Verification
Fix for: How to use a pipe to edit a file with vi
Low Risk
At least for vim (not sure about vi), you can do The '-' tells vim to read from stdin.
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix