#! /bin/csh -f # # stripsessargs # # Original Author: Doug Greve # CVS Revision Info: # $Author: nicks $ # $Date: 2007/01/09 22:41:19 $ # $Revision: 1.2 $ # # Copyright (C) 2002-2007, # The General Hospital Corporation (Boston, MA). # All rights reserved. # # Distribution, usage and copying of this software is covered under the # terms found in the License Agreement file named 'COPYING' found in the # FreeSurfer source code root directory, and duplicated here: # https://surfer.nmr.mgh.harvard.edu/fswiki/FreeSurferOpenSourceLicense # # General inquiries: freesurfer@nmr.mgh.harvard.edu # Bug reports: analysis-bugs@nmr.mgh.harvard.edu # set VERSION = '$Id: stripsessargs,v 1.2 2007/01/09 22:41:19 nicks Exp $'; set otherargs = (); while( $#argv != 0 ) set flag = $argv[1]; shift; switch($flag) case "-s": case "-sf": case "-df": case "-d": case "-g": if( $#argv == 0) goto arg1err; shift; breaksw default: set otherargs = ($otherargs $flag); breaksw endsw end echo $otherargs exit 0; ############--------------################## ############--------------################## arg1err: echo "ERROR: flag $flag requires one argument" exit 1 ############--------------##################