Christian Couder <christian.couder@xxxxxxxxx> 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).