From: Michael Witten Date: Wed, 17 Oct 2007 11:23:31 GMT Subject: Re: On Tabs and Spaces Message-ID: <6A484AE6-ECCD-4473-BEF8-3451EBF8FAFF@mit.edu> In-Reply-To: On 17 Oct 2007, at 6:21:30 AM, Nikolai Weibull wrote: > According to this calculation the waste is 47808782 bytes, or about > 45.6 MiB, for 8-spaces-wide tabs. I concede my calculation was crude. Interestingly, modifying my calculation to look for tabs at the beginning of the line gives a similar result: # calculates the extra space required to # use the given number of spaces/tab. size() { count=`grep -RIo "^\`printf \"\t\"\`" . | wc -l`; perl -e "print $count*$(($1-1))/1024/1024 . \" MiB\n\""; } size 8; => 49.7416791915894 MiB and for git: size 8; => 1.25082969665527 MiB Anyway, thanks for the neat script. mfwitten