#!/bin/sh
#
# A simple tokens implementation
#
# $Id: tokens,v 1.1 1999/05/25 03:18:00 lha Exp $

PATH=/usr/athena/bin:/usr/bin:/usr/local/bin:/bin:$PATH

if test $# != 0; then echo "Usage: tokens [-help]"; exit 1 ; fi

klist -tokens | awk '
BEGIN { foo = 0 }
/^AFS tokens:$/ { foo = 1 }
/AFS ID/ { if (foo == 0) { foo = 1 }}
{ if (foo == 2) { print } }
{ if (foo == 1) { print "\nTokens held by the AFSClient:\n" ; foo = 2 }}
'
