From 27fe6e199df63acad1d6a19fca87868cdd929af4 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 14 Feb 2013 00:00:00 +0000 Subject: [PATCH] Simplify sort_stable_k2 --- git-remote-gcrypt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/git-remote-gcrypt b/git-remote-gcrypt index b0a4fdf..c265617 100755 --- a/git-remote-gcrypt +++ b/git-remote-gcrypt @@ -42,8 +42,7 @@ xgrep() { command grep "$@" || : ; } sort_C() { LC_ALL=C command sort "$@"; } sort_stable_k2() { - awk '{ printf("%08d %s\n", NR, $0) }' | sort_C -k3,3 -k1,1 | - awk '{ print $2 " " $3 }' + awk '{ printf("%08d\t%s\n", NR, $0) }' | sort_C -k3,3 -k1,1 | cut -f 2- } tac() { sed '1!G;h;$!d'; }