On Sat, Oct 09, 2010 at 12:06:21AM +0200, Sven Mascheck wrote:

> find . -type f -name '*.c' -exec sh -c 'vi "$@"' find-sh {} +

PS (still offtopic): vi was not the original example, it came as
illustration.  But sh -c '' is only useful if you still have to process
the filenames somehow (which I confused). Otherwise it's simply

find . -type f -name '*.c' -exec vi {} +

The usefulness and robustness of sh -c '' (in connection with
a loop, in case) - especially about files with spaces or
newlines - remains worth to mention, though.

Reply via email to