Originally Posted by ifeatu
Thats good...but what about if the output has multiple results?
If there's a problem with the line feeds, you can always parse one at a time:
locate <filename> | while read file; do vi "$file"; done
for i in `find filename`; do vi "$i"; done
However, this will open the files sequentially (you close vim, and the next one is opened), and not all at the same time. If you need that, then you need further processing as the previous poster noted. But there's no need to use a file
vi `locate file | tr '\n' ' '`
Should work, if I didn't make any typo
PS. Things will go complicated if you have file names with spaces.