From 56609b662ea74b79857d89415ac8570df7ff25a1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Johannes=20Wei=C3=9Fl?= Date: Sun, 5 Dec 2010 12:52:25 +0100 Subject: [PATCH] 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. --- muttjump | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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-) -- 2.30.2