From: Junio C Hamano Date: Thu, 13 Mar 2008 04:52:18 GMT Subject: Re: [PATCH 08/16] t4200: use cut instead of sed Message-ID: <7vejaf1b0d.fsf@gitster.siamese.dyndns.org> In-Reply-To: <20080312213756.GI26286@coredump.intra.peff.net> Jeff King writes: > Some versions of sed (like the one on Solaris) don't like to > match literal tabs, and simply print nothing. Instead, let's > use cut. > -sha1=$(sed -e 's/ .*//' .git/rr-cache/MERGE_RR) This is a bit hard to believe. On one of my ancient Sun box: $ uname -a SunOS sic.twinsun.com 5.8 Generic_117350-45 sun4u sparc SUNW,UltraSPARC-IIi-Engine $ ls -l /bin/sed -r-xr-xr-x 1 root bin 28748 Aug 2 2005 /bin/sed the above "sed" does not misbehave (/bin/sh does, of course, on $(...), but that is a different story).