Re: [OCLUG-Tech] Consistency (was Re: is "xargs" really still useful just for limiting command line size?)

2018-03-16 Thread Shawn H Corey
On Fri, 16 Mar 2018 10:31:33 -0400 Dianne Skoll wrote: > On Fri, 16 Mar 2018 10:26:36 -0400 > Shawn H Corey wrote: > > > git ls-files -z | xargs -0 grep 'function_name' > > > The -z separates the names with a ASCII NUL and the -0 (minus zero) >

[OCLUG-Tech] Consistency (was Re: is "xargs" really still useful just for limiting command line size?)

2018-03-16 Thread Dianne Skoll
On Fri, 16 Mar 2018 10:26:36 -0400 Shawn H Corey wrote: > git ls-files -z | xargs -0 grep 'function_name' > The -z separates the names with a ASCII NUL and the -0 (minus zero) > allows xarg to read them correctly. This is useful if the files have > spaces in their names.