Fix tail portability problem by adding an expression test to the
authorKen Raeburn <raeburn@mit.edu>
Wed, 14 Mar 2007 00:52:47 +0000 (00:52 +0000)
committerKen Raeburn <raeburn@mit.edu>
Wed, 14 Mar 2007 00:52:47 +0000 (00:52 +0000)
existing awk invocation instead.  Patch from Robert Basch at MIT.

ticket: 5447

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19225 dc483132-0cff-0310-8789-dd5450dbe970

src/kadmin/cli/k5srvutil.sh

index 70b1b8548a2a518523a711d32b8828191989a396..e1284e6af4af1133b0e65507ff3c9d7f4afaece0 100755 (executable)
@@ -4,7 +4,7 @@
 # returns a list of principals in the keytab
 # sorted and uniquified
 list_princs() {
-    klist -k $keytab | tail +4 | awk '{print $2}' | sort | uniq
+    klist -k $keytab | awk '(NR > 3) {print $2}' | sort | uniq
 }
 
 set_command() {