From 95e8812370207ed80812ad1c3b17a00cdac3c9b6 Mon Sep 17 00:00:00 2001 From: phigoro Date: Mon, 11 May 2015 19:54:38 +0300 Subject: [PATCH] git-effort: replace "wc | cut" with "wc | awk" It looks "cut" may have different behaviour, e.g. BSD one works the way git-effort doesn't expect. "awk" looks to be one of possible fixes here. --- bin/git-effort | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/git-effort b/bin/git-effort index ac55d27..8ada5a8 100755 --- a/bin/git-effort +++ b/bin/git-effort @@ -139,7 +139,7 @@ trap show_cursor_and_cleanup INT heading effort "${files[@]}" | tee $tmp -test "$(wc -l $tmp | cut -d' ' -f1 )" -gt 1 && sort_effort +test "$(wc -l $tmp | awk '{print $1}')" -gt 1 && sort_effort echo show_cursor_and_cleanup