#!/bin/tcsh -f # -*-csh-*- # modified from: # subp P.E.+M.J.H. 10/89 set iput=$1 if ( $iput == "" ) then echo 'usage: subp file [output file] ' exit endif set oput=$2 if ( ! -e $iput ) then if ( ! -e $iput.com ) then if ( ! -e ${iput}com ) then echo sub: The command file $iput does not exist. exit else set iput=${iput}com endif else set iput=$iput.com endif endif if ( $oput == "" ) then set iput2=$iput:r set iput3=$iput2:t set oput=$iput3.log endif (time csh $iput >& $oput ); set stat=$status; echo $oput:r "has finished with status $stat" &