Re: [PATCH v5 1/2] cat-file: add mailmap support to -s option
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 21, 2022, 09:45 UTC
- Message-ID
- <xmqqtu2svdy2.fsf@gitster.g>
- In-Reply-To
- <CAP8UFD1CB90eoWpQmGJbfxK7uHX0-u4BuSE-v=mD1yuW+nnAxA@mail.gmail.com>
Christian Couder <christian.couder@gmail.com> writes:
> Yeah, right. So I would suggest the following: > > git cat-file commit HEAD >commit.out && > wc -c <commit.out | sed -e 's/^ *//' >expect &&
You should not use sed for things like that.
echo $(wc -c <file)
should suffice to strip away unwanted $IFS around the output (Note. lack of any quotihg around $() is the key).