When I run the following command in linux:
find / -iname httpd.conf
I want to use nano to edit this file, lazy to type the file path again, I used:
find / -iname httpd.conf | nano
It didn't work, nano quickly opened and exited, then I found a nano.save file in the directory that I ran this command. Using cat command on nano.save, it outputs the text: /usr/local/apache/conf/httpd.conf
This means nano thinks the previous piped output as a string that I want to write to a file, but the fact is, I would like nano to think it as the file path so that it actually opens the file for me to do the editing.
How can we make nano accept previous piped output as a file path?