• There are many fsl command line utilities, but there are also specific utilities to assist with scripting:
    1. remove_ext
        this removes only image specific extensions: .nii.gz .nii .hdr .img .hdr.gz .img.gz
        e.g. remove_ext /Volumes/MJ/img1.nii.gz gives /Volumes/MJ/img1
    2. imtest
        this returns the character 1 if the specified file exists and is an image, or 0 otherwise
        e.g. imtest ../img1 gives 1 if ../img1.nii.gz exists (or if ../img1.hdr exists, etc.)
    3. imglob
        this expands into a list of full filenames for images only
        e.g. imglob * lists only the images out of all matches for *
    4. imcp, immv, imrm, imln
        these do cp, mv, rm and ln for images, without needing to specify the extensions (useful when dealing with Analyze or nifti files without needing to know which)
        e.g. imcp im1 im1_orig would be the same as cp im1.nii.gz im1_orig.nii.gz for nifti files, but would do cp im1.hdr im1_orig.hdr and cp im1.img im1_orig.img for Analyze files