From: Johannes Weißl Date: Sun, 5 Dec 2010 11:52:25 +0000 (+0100) Subject: replace `wc -L` with awk script X-Git-Url: https://projects.mako.cc/source/muttjump/commitdiff_plain/56609b662ea74b79857d89415ac8570df7ff25a1?ds=inline;hp=9ef362ae89acc75a6a164e5c213e29f5ab9c1d35 replace `wc -L` with awk script Mac OS X version of wc doesn't have "-L": http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/wc.1.html Thanks to Christian Ebert for pointing that out. --- diff --git a/muttjump b/muttjump index 82b9ea3..fc8f3d4 100755 --- a/muttjump +++ b/muttjump @@ -71,6 +71,10 @@ function is_callable () { type $1 >/dev/null 2>&1 } +function wc_L () { + awk '{ y = length(); if (y > x) x = y } END { print x }' +} + function usage () { cat >&2 <&2 2>&1 1>&3-)