From: Junio C Hamano Date: Sun, 29 Oct 2017 00:14:29 GMT Subject: Re: [PATCH 4/6] t0021/rot13-filter: add packet_initialize() Message-ID: In-Reply-To: <09393EDB-19A3-4244-A88F-68EDA8470898@gmail.com> Lars Schneider writes: > BTW: I am using this little snippet to apply patches from the mailing: > > PATCH=$(curl -L --silent https://public-inbox.org/git/xmqqr2tpcn6g.fsf@gitster.mtv.corp.google.com/raw); > ((printf '%s' "$PATCH" | git am -3) || (git am --abort; printf '%s' "$PATCH" | git apply)) && > echo && echo "Patch successfully applied" > > Does this look sensible to you? Sensible? I have no answer. I wouldn't trust printf well enough to stuff large value in a shell variable and feeding it myself in the first place, but I would not be surprised if you did VAR=$(command) && printf '%s' "$VAR" >output and ended up with a file with an incomplete line at the end.