#!/bin/csh -xv
#
# rcsVers
#
# x-kernel v3.2
#
# Copyright (c) 1993,1991,1990  Arizona Board of Regents
#
# $Revision: 1.1 $
# $Date: 1995/07/28 21:57:30 $
#
#
# Prints to standard output the RCS version number corresponding to
# the symbolic name

set pgm = $0
set pgm = $pgm:t
set quietFlag = 0

if ( $#argv < 2 ) then
        echo "usage: $pgm [-q] symname file"
        exit 1
endif
if ( $1 == "-q" ) then
        set quietFlag = 1
        shift
endif

if ( $1 == "head" ) then
        set revString = ""
else
        set revString = "-r$1"
endif

if ( $quietFlag ) then
        (co -p $revString $2 > /dev/null) |& grep revision > /dev/null
        exit $status
else
        (co -p $revString $2 > /dev/null) |& grep revision | awk '{print $2}'
        exit $status
endif

