#!/bin/csh

if ($#argv !=1) goto error1
if ($argv[1] < 6) goto error2
goto OK

error1:
   echo "Invalid - wrong number or no arguments"
   echo "Quitting"
   exit 1

error2:
   echo "Invalid argument - must be greater than 5"
   echo "Quitting"
   exit 1

OK:
   echo "Argument = $argv[1]"
   exit 1