#!/bin/sh clear for j in *PROD; do if [ ! -f $j ]; then echo " " echo "Sorry, no files are currently available" echo " " exit 0 else break fi done echo " " echo "The following data files are available for reading :" echo " " file_list=`ls *.*PROD` set $file_list count=0 for i in $file_list do count=`expr $count + 1` echo "$count) $i" done echo "Please enter the number of the file you want to read : \c" read file_num while [ $file_num -lt 0 ] || [ $file_num -gt $count ] do echo "Re-enter the file number please : "\\c read file_num done count2=0 for k do count2=`expr $count2 + 1` if [ $count2 -eq $file_num ] then prod=$k fi done meta=`echo $prod | sed "s/PROD/META/"` echo " " echo " " echo "1) Screen" echo "2) Screen using 'more'" echo "3) Output to a file" echo "0) Quit" echo "Please choose a display option :" \\c read ans while [ $ans -lt 0 ] || [ $ans -gt 3 ] do echo "Re-enter your choice please : " \\c read ans done if [ $ans -eq 0 ] then exit 0 fi case "$ans" in '1' ) if echo $meta | grep "L3AL" > /dev/null then readump/bin/readump_l3al_data $meta fi if echo $meta | grep "L3AT" > /dev/null then readump/bin/readump_l3at_data $meta fi if echo $meta | grep "MLS_L3LP" > /dev/null then readump/bin/readump_mls_l3lp_data $meta fi if echo $meta | grep "ISAMS_L3LP" > /dev/null then readump/bin/readump_isams_l3lp_data $meta fi if echo $meta | grep "MLS_L3TP" > /dev/null then readump/bin/readump_mls_l3tp_data $meta fi if echo $meta | grep "ISAMS_L3TP" > /dev/null then readump/bin/readump_isams_l3tp_data $meta fi if echo $meta | grep "NMC" > /dev/null then readump/bin/readump_nmc_data $meta fi if echo $meta | grep "UKMO" > /dev/null then readump/bin/readump_ukmo_data $meta fi if echo $meta | grep "L3BS" > /dev/null then readump/bin/readump_l3asbs_data $meta fi if echo $meta | grep "PEM_L3TP" > /dev/null then readump/bin/readump_pem_l3tp_data $meta fi if echo $meta | grep "HALOE_L3TP" > /dev/null then readump/bin/readump_haloe_l3tp_data $meta fi if echo $meta | grep "WINDII_L3LP" > /dev/null then readump/bin/readump_windii_l3lp_data $meta fi if echo $meta | grep "WINDII_L3TP" > /dev/null then readump/bin/readump_windii_l3tp_data $meta fi ;; '2' ) if echo $meta | grep "L3AL" > /dev/null then readump/bin/readump_l3al_data $meta | more fi if echo $meta | grep "L3AT" > /dev/null then readump/bin/readump_l3at_data $meta | more fi if echo $meta | grep "MLS_L3LP" > /dev/null then readump/bin/readump_mls_l3lp_data $meta | more fi if echo $meta | grep "ISAMS_L3LP" > /dev/null then readump/bin/readump_isams_l3lp_data $meta | more fi if echo $meta | grep "MLS_L3TP" > /dev/null then readump/bin/readump_mls_l3tp_data $meta | more fi if echo $meta | grep "ISAMS_L3TP" > /dev/null then readump/bin/readump_isams_l3tp_data $meta | more fi if echo $meta | grep "NMC" > /dev/null then readump/bin/readump_nmc_data $meta | more fi if echo $meta | grep "UKMO" > /dev/null then readump/bin/readump_ukmo_data $meta | more fi if echo $meta | grep "L3BS" > /dev/null then readump/bin/readump_l3asbs_data $meta | more fi if echo $meta | grep "PEM_L3TP" > /dev/null then readump/bin/readump_pem_l3tp_data $meta | more fi if echo $meta | grep "HALOE_L3TP" > /dev/null then readump/bin/readump_haloe_l3tp_data $meta | more fi if echo $meta | grep "WINDII_L3LP" > /dev/null then readump/bin/readump_windii_l3lp_data $meta | more fi if echo $meta | grep "WINDII_L3TP" > /dev/null then readump/bin/readump_windii_l3tp_data $meta | more fi ;; '3' ) echo " " echo "Enter output file name :" \\c read dataname if echo $meta | grep "L3AL" > /dev/null then readump/bin/readump_l3al_data $meta > $dataname fi if echo $meta | grep "L3AT" > /dev/null then readump/bin/readump_l3at_data $meta > $dataname fi if echo $meta | grep "MLS_L3LP" > /dev/null then readump/bin/readump_mls_l3lp_data $meta > $dataname fi if echo $meta | grep "ISAMS_L3LP" > /dev/null then readump/bin/readump_isams_l3lp_data $meta > $dataname fi if echo $meta | grep "MLS_L3TP" > /dev/null then readump/bin/readump_mls_l3tp_data $meta > $dataname fi if echo $meta | grep "ISAMS_L3TP" > /dev/null then readump/bin/readump_isams_l3tp_data $meta > $dataname fi if echo $meta | grep "NMC" > /dev/null then readump/bin/readump_nmc_data $meta > $dataname fi if echo $meta | grep "UKMO" > /dev/null then readump/bin/readump_ukmo_data $meta > $dataname fi if echo $meta | grep "L3BS" > /dev/null then readump/bin/readump_l3asbs_data $meta > $dataname fi if echo $meta | grep "PEM_L3TP" > /dev/null then readump/bin/readump_pem_l3tp_data $meta > $dataname fi if echo $meta | grep "HALOE_L3TP" > /dev/null then readump/bin/readump_haloe_l3tp_data $meta > $dataname fi if echo $meta | grep "WINDII_L3LP" > /dev/null then readump/bin/readump_windii_l3lp_data $meta > $dataname fi if echo $meta | grep "WINDII_L3TP" > /dev/null then readump/bin/readump_windii_l3tp_data $meta > $dataname fi ;; esac echo " "