I am doing a find $PWD -name 'filename' | vim -
expecting the file filename to be opened in vim editor. but it is not working. In this case, I am sure that there exists just one file with name 'filename'.
Also the result of find gives the complete path on stdout.
command | vim -tells vim to read the output fromcommandand put it into a buffer. (As opposed to opening those files.)vim <(command)does the same, using Bash process substitution, and this works with more than just vim. e.g. to see the differences between two directories, usediff <(ls -l dir1) <(ls -l dir2)