#!/bin/sh # Token.sh # 2003-10-21 # Chieh Cheng # http://www.CynosureX.com/ # GNU General Public License (GPL), Version 2, June 1991 # Returns the token specified on the command-line scriptname=`echo $0 | sed s/\\\\/.*\\\\///g` if [ $# -ne 1 ] then echo " Usage: $scriptname num" exit fi num=$1 count=1 read tokens for token in $tokens do if [ $num -eq $count ] then echo $token break fi count=`expr $count + 1` done