Re: more git updates..

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Linus,

> Btw, the NUL-termination makes this really easy to use even in shell
> scripts, ie you can do
> 
> 	diff-tree <sha1> <sha1> | xargs -0 do_something
> 
> and you'll get each line as one nice argument to your "do_something"
> script. So a do_diff could be based on something like
> 
> 	#!/bin/sh

Watch out for when xargs invokes do_something more than once and the `<'
is parsed by a different one than the `>'.  A `while read ...; do ...
done' would avoid that, but wouldn't like the NULs instead of LFs.

Cheers,


Ralph.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux