Is there a way to run xargs on only the first argument of a line? So if my input is the default output from a grep, like this:
./file1 "matching string"
./file2 "matching 2"
What I want to do is open all of the file names in Vim with something like | xargs vim.
Can I tell xargs to just grab the first word of each line?
I know there are other ways of doing this, including piping to AWK to strip all the extra line garbage, and getting grep to only return the filename - I'm curious whether you can do this with xargs.
cut? – billc.cn Dec 6 '11 at 23:06