xargs.go
func Xargs(command string, args ...string) *XargsFilter {
	// Compute length of command+args
	base := len(command)
	for _, a := range args {
		base += 1 + len(a)
	}
	return &XargsFilter{
		command:    command,
		args:       args,
		limitArgs:  4096,
		limitBytes: 4096 - 100 - base, // Posix limit with slop
	}
}
func Xargs(command string, args ...string) *XargsFilter {
	// Compute length of command+args
	base := len(command)
	for _, a := range args {
		base += 1 + len(a)
	}
	return &XargsFilter{
		command:    command,
		args:       args,
		limitArgs:  4096,
		limitBytes: 4096 - 100 - base, // Posix limit with slop
	}
}
func Xargs ( command string , args ... string ) * XargsFilter { // Compute length of command+args base := len ( command ) for _ , a := range args { base += 1 + len ( a ) } return & XargsFilter { command : command , args : args , limitArgs : 4096 , limitBytes : 4096 - 100 - base , // Posix limit with slop } }
// Xargs returns a filter that executes "command args... items..."
// where items are the input to the filter.  The handling of items may
// be split across multiple executions of command (typically to meet
// command line length restrictions).  The standard output of the
// execution(s) is split into lines and the lines form the output of
// the filter (with trailing newlines removed).
Xargs returns a filter that executes command args ... items ... where items are the input to the filter . The handling of items may be split across multiple executions of command ( typically to meet command line length restrictions ) . The standard output of the execution ( s ) is split into lines and the lines form the output of the filter ( with trailing newlines removed ) .