Debian Codegraph @

fsliolib/imrm

raw
1 #!/bin/sh
2
3 # imrm - remove image files
4 #
5 # Stephen Smith and Mark Jenkinson, FMRIB Image Analysis Group
6 #
7 #
8 # The imrm file was originally part of FSL - FMRIB's Software Library
9 # http://www.fmrib.ox.ac.uk/fsl
10 # imrm has now been placed in the public domain.
11 #
12 # Developed at FMRIB (Oxford Centre for Functional Magnetic Resonance
13 # Imaging of the Brain), Department of Clinical Neurology, Oxford
14 # University, Oxford, UK
15 #
16 #
17
18 if [ $# -lt 1 ] ; then
19 echo "Usage: $0 <list of image names to remove>"
20 echo "NB: filenames can be basenames or not"
21 exit 1;
22 fi
23
24 for f in $@ ; do
25 fn=`${FSLDIR}/bin/remove_ext $f`;
26 # do the rm silently
27 /bin/rm -f ${fn}.img ${fn}.hdr ${fn}.hdr.gz ${fn}.img.gz ${fn}.nii ${fn}.nii.gz ${fn}.mnc ${fn}.mnc.gz
28 done