I am trying to do something like
vi `grep -Rl 'keyword'`
But I want to support spaces in the file names.
vi "`grep -Rl 'keyword'`"
Does not do what I need, it turns the grep output in a single argument with \n in it.
I tried
vi "`grep -Rl 'keyword'`| xargs"
And while it looks better, the result still is a single argument (now with spaces instead of \n).
Is there a good way to do this? Bash is fine, bonus points for being POSIX compliant.
PS.
I am aware the -R option is not available for all grep implementations and that bash has the nice nestable "$()" notation for ``.
vi? Why not just usegrep -Rl "keyword" /path/to/files/*?keywordshould be modified... edit modified the question title to no longer mention pipe...