Remi Galan Alfonso <[email protected]>
writes:
> In this case it is not true, because of the infile and outfile being
> identical. However sort does have a -o (-output) that I missed that
> allows avoiding using echo or writing in another file; I'm correcting
> with this.
Even though it is in POSIX, some implementation may lack it, so our
code tend to avoid "sort -o". "echo $(sort)" is also ugly and
inefficient. The obvious and old-fashioned would be sufficient here:
sort -u "$todo".oldsha1 >"$todo".oldsha1+ &&
mv "$todo".oldsha1+ "$todo".oldsha1
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html