Alien-Judy

 view release on metacpan or  search on metacpan

src/judy-1.0.5/test/jbgraph  view on Meta::CPAN

       CHA[${i}]="${i} ${CHA[${i}]}"
       ${v}echo "${C}.${0}:  CHA[${i}]=\"${CHA[${i}]}\""
       let i=i+1
    done
    ${v}echo "${C}.${0}:  completed at `date`\n"	# end of function
} # FUNCTION_n()			# -n number plot descriptions.

FUNCTION_units()			# Resolve units.
{
#
# Expand units of the form 1K to 1000, 1M to 1000000, et.al.
# Used to format the gnuplot parameters xRANGE and yRANGE.
# gnuplot data format:  "set xrange [1:1000000]"
#

    Fu_IN="${1}"			# Units in.
    echo "["${Fu_IN}"]" |
      sed -e "s/[kK]/000/g"	      | # 1,000
      sed -e "s/[mM]/000000/g"	      | # 1,000,000
      sed -e "s/[gG]/000000000/g"     | # 1,000,000,000
      sed -e "s/^\[\[/\["/g	      | # Ensure single leading bracket.
      sed -e "s/\]\]$/\]"/g	        # Ensure single trailing bracket.
}

FUNCTION_a()				# -a Option description.
{
#
# Replace with description of this function.
#

    ${v}echo "${C}.${0}:  beginning at `date`"	# beginning of function
    ${v}echo "${C}.${0}:  OPT_a=${OPT_a}, # -a Option description."
    ${v}echo "${C}.${0}:  completed at `date`\n"	# end of function
} #

FUNCTION_b()				# -b Option description.
{
#
# Replace with description of this function.
#

    ${v}echo "${C}.${0}:  beginning at `date`"	# beginning of function
    ${v}echo "${C}.${0}:  OPT_b=${OPT_b}, # -b Option description."
    MSG="# -b   Parameter description."
    ${v}echo "${C}.${0}:  OPT_b_PARM=${OPT_b_PARM}, ${MSG}"

    if [ -r "${OPT_b_PARM}" ]; then	# Ensure this is a file.
        echo ${OPT_b_PARM} |
          while read -r FILE; do
            ${v}echo "${C}.${0}:  FILE=${FILE}"
          done
    else				# Or use elif (form of elseif).
        ${v}echo "${C}.${0}:  ERROR, ${OPT_b_PARM} is not a readable file."
    fi

    ${v}echo "${C}.${0}:  completed at `date`\n"	# end of function
} #


#
# MAIN:  Main driver, main processing occurs here.
#


    ${v}echo "\n${C}:  beginning at `date`" # page overflow with each start.

    CMD_LINE="${0} ${*}"		# Save command called and options.

    FUNCTION__getopt ${*}		# Parse the options.

    if [   -z "${OPT_NE}" ] &&		# Not E is not turned on and E is...
       [ ! -z "${OPT_E}" ]; then	# -E use embedded options
        FUNCTION_TITLE_COLHEAD ${FILES}	# Set Column headings from file.
    fi

    FUNCTION__getopt ${*} >/dev/null 2>&1 # Parse the options.

    type banner >/dev/null 2>&1		# Check if banner exists.
    RC="${?}"				# Save return code.
    if [ "${RC}" = "0" ]; then		# if RC=0, banner exists.
        ${v}banner ${C}
    fi

    ${v}echo "${C}:  RCS_SCRIPT=${RCS_SCRIPT}"
    ${v}echo "${C}:  PWD=${PWD}"

    if [ ! -z "${OPT_n}" ]; then
        FUNCTION_n			# -n number plot descriptions.
    fi

    # If GNU_CMDFILE exists, use it, do not create it.
    if [ ! -f ${GNU_CMDFILE} ]; then	# ! -f = if this is not a file.
	if [ "${FILES}" = "" ]; then	# If no files available
	    MSG="and GNU_CMDFILE is not a file  exit 7"
	    echo "${C}:  ERROR:  no FILES to plot!  ${MSG}"
	    exit 7
	    break
	fi
        FUNCTION_gnuplot_init ${*}	# Initialize gnuplot command file.

        FUNCTION_gnuplot_plot ${FILES}	# Plot these files.

        echo pause -1 \'Pause: press return to continue.\' >> ${GNU_CMDFILE}
        echo				# Place blank line in log file.
    fi

    FUNCTION_gnuplot_display		# Plots the datapoints.


    if [ ! -z "${OPT_p}" ]; then
        FUNCTION_gnuplot_print		# -p print the plot.
    fi


# REMOVE FILES, CLEANUP:
#
# Remove the working files and filenames, unless "-S" is on.

    if [ "${OPT_S}" = "-S" ]; then		# -S save files.
        echo "${C}: saving  ${COMMAND}"
        echo "${C}: saving  ${GNU_CMDFILE}"



( run in 1.409 second using v1.01-cache-2.11-cpan-140bd7fdf52 )