From: Emanuel Berg <moasen@zoho.com>
To: help-gnu-emacs@gnu.org
Subject: Re: config problems and bisecting an org-mode configuration file
Date: Wed, 07 Jun 2017 03:26:00 +0200 [thread overview]
Message-ID: <yw.86ink8si53.fsf@zoho.com> (raw)
In-Reply-To: yw.86vao8sl2b.fsf@zoho.com
Here is an even better way I found on the web
(see commented-out URL) with some very minor
changes. Do
elisp-lines | numbers
I have
items sum low high median mean
71 3891 6 376 41 55
:)
elisp-lines () {
for f in *.el; do
wc -l $f
done
}
numbers () {
# thank you: https://unix.stackexchange.com/a/13779
echo "items\tsum\tlow\thigh\tmedian\tmean"
sort -n | awk '
BEGIN {
c = 0;
sum = 0;
}
$1 ~ /^[0-9]*(\.[0-9]*)?$/ {
a[c++] = $1;
sum += $1;
}
END {
ave = int(sum/c) + 1;
if ( (c % 2) == 1 ) {
median = a[ int(c/2) ];
} else {
median = ( a[c/2] + a[c/2-1] ) / 2;
}
OFS="\t";
print c, sum, a[0], a[c-1], median, ave
}
'
}
--
underground experts united
http://user.it.uu.se/~embe8573
next prev parent reply other threads:[~2017-06-07 1:26 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-03 13:00 config problems and bisecting an org-mode configuration file Sharon Kimble
2017-06-03 15:46 ` Emanuel Berg
2017-06-04 19:28 ` Sharon Kimble
2017-06-05 16:21 ` Emanuel Berg
2017-06-05 18:32 ` Sharon Kimble
2017-06-05 21:04 ` Emanuel Berg
2017-06-06 13:03 ` Sharon Kimble
2017-06-07 0:22 ` Emanuel Berg
2017-06-07 1:07 ` Emanuel Berg
2017-06-07 1:26 ` Emanuel Berg [this message]
2017-06-07 1:43 ` Emanuel Berg
2017-06-05 23:18 ` Robert Thorpe
2017-06-05 23:48 ` Emanuel Berg
2017-06-06 12:56 ` Sharon Kimble
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yw.86ink8si53.fsf@zoho.com \
--to=moasen@zoho.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.