#! /bin/bash -eu

smpsec="$1"; shift
sizeopt="$1"; shift

# Obtain sample size for this section:
if [[ "/${sizeopt}" == "/whole" ]]; then
  rawSize=9999999
elif [[ "/${sizeopt}" == "/trunc" ]]; then
  secattr=( `get_sample_section_attrs.sh ${smpsec}` )
  rawSize="${secattr[2]}"
else
  echo "invalid sizeopt = ${sizeopt}"; exit 1
fi 
echo ${rawSize}
