#!/bin/tcsh -f
if ("$1" == '' || "$1" == '-h' || "$1" == '-help') then
goto USAGE
endif
set ans = `3dinfo "$1" | grep '\[-orient' | cut -d[ -f2 | cut -d] -f1`
if ( "$ans[1]" != "-orient" ) then
echo "Error: Failed to find -orient string in 3dinfo output"
goto ENDALL
endif
echo $ans[2]
goto ENDALL
USAGE:
echo "Usage: `basename $0` <Name> ....."
echo "example: `basename $0` Hello+orig.HEAD"
echo "returns the orient code of Hello+orig.HEAD"
echo "Ziad Saad (ziad@nih.gov)"
echo "SSCC/NIMH/ National Institutes of Health, Bethesda Maryland"
goto ENDALL
ENDALL:
syntax highlighted by Code2HTML, v. 0.9.1