]> Nutra Git (v2) - gamesguru/git-remote-gcrypt.git/commitdiff
Simplify sort_stable_k2
authorroot <root@localhost>
Thu, 14 Feb 2013 00:00:00 +0000 (00:00 +0000)
committerroot <root@localhost>
Thu, 14 Feb 2013 00:00:00 +0000 (00:00 +0000)
git-remote-gcrypt

index b0a4fdf9085c761d713be0833627625c2b3aa50c..c265617717675f3619e006b90a9cce1b01b5ac57 100755 (executable)
@@ -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'; }