This file is indexed.

/usr/bin/mincheader is in minc-tools 2.2.00-3.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#! /bin/sh
#
# Script to view header info of MINC files.
#
# Usage: mincheader [-data] <file.mnc>
# Exit status: status of `mincdump'
#
#
# Modifications: 
#   $Log: mincheader,v $
#   Revision 6.4  2008-01-04 06:01:23  rotor
#    * updated shell scripting style and added more verbose help
#
#   Revision 6.3  2004/04/27 15:32:58  bert
#   Use mincdump instead of ncdump
#
#   Revision 6.2  2000/09/12 15:20:07  neelin
#   Rewrite in Bourne shell by Steve Robbins. Returns exit status from mincdump.
#
#   Revision 6.1  1999/10/19 14:45:23  neelin
#   Fixed Log subsitutions for CVS
#
#   Revision 6.0  1997/09/12 13:23:37  neelin
#   Release of minc version 0.6
#   
#   Revision 5.0  1997/08/21  13:24:37  neelin
#   Release of minc version 0.5
#  
#   Revision 4.0  1997/05/07  20:00:42  neelin
#   Release of minc version 0.4
#  
#   Revision 3.0  1995/05/15  19:31:32  neelin
#   Release of minc version 0.3
#  
#   Revision 2.2  1995/01/25  08:04:41  neelin
#   Added check for failure to read minc file.
#  
#   Revision 2.1  95/01/24  10:19:09  neelin
#   Added support for compressed files.
#   
#   Revision 2.0  94/09/28  10:34:10  neelin
#   Release of minc version 0.2
#   
#   Revision 1.6  94/09/28  10:34:06  neelin
#   Pre-release
#   
#   Revision 1.5  93/10/14  10:09:35  neelin
#   Fixed usage error message.
#   
#   Revision 1.4  93/08/25  11:24:20  neelin
#   Added checking for -h or -help options.
#   
#   Revision 1.3  93/08/11  15:20:55  neelin
#   Added RCS logging in source.
# 

set -o errexit
set -o nounset


# simple little function to emulate perl's die();
die () {
    echo >&2 "$@"
    echo ""
    exit 1
}

# create tmpdir
tmpdir=${TMPDIR:-/tmp}/mincedit.$$
trap 'rm -rf "$tmpdir"' 0
trap ' exit ' 1 2 15
(umask 077 && mkdir $tmpdir) || {
   echo "$0: Could not create temporary directory! Exiting." 1>&2
   echo ""
   exit 1
   }

me=`basename $0`
usage="Usage: $me [-data] <minc file>"

# set defaults and then get arguments
header_opts='-header_only'
header_only=yes
while [ $# -gt 0 ]
do 
   case "$1" in
      -h|-he|-hel|-help)
         echo $usage;
         echo ""
         exit 0
         ;;
   
      -d|-da|-dat|-data)
         header_opts='-all_data';
         header_only=no
         ;;
   
      *)
         break;
   
   esac
   shift
done

# only allow one input file and check for it
[ $# -eq 1 ] || die $usage
[ -f "$1" ] || die "$me: no such file '$1'"

tmpfile="$tmpdir/mincheader-$$-tmp"

# For a compressed file, dump header only unless directed otherwise
dumpfile=`mincexpand "$1" $tmpfile -name_only $header_opts`
if [ "$dumpfile" = $tmpfile -a $header_only = yes ]
then
    mincdump -h "$dumpfile"
else
   #  Get variables names (excluding image): remove leading "image", remove word 
   #  "image", collapse multiple blanks to one, remove leading blanks, remove
   #  trailing blanks, replace blanks with commas
   vars=`mincinfo -varnames "$dumpfile" | \
   sed -e 's/^image //g' \
       -e 's/ image / /g' \
       -e 's/  */ /g' \
       -e 's/^ //' \
       -e 's/ $//' \
       -e 's/ /,/g'`
   
   [ x$vars = x ] || mincdump -v "$vars" "$dumpfile"
fi