# This script is a menu and all files (Not TTFILES) associated with it are located in the same directory. # All script explanations are located within the associated script files themseleves # This menu is quite understandable so no explanation is needed. # Script written by David M. Hagens # Use as you want #! /usr/bin/sh LOGO="Call Trace Menu" amenu="a. Display search results" ; bmenu="b. Use a date only search" ; cmenu="c. Use a time only search" ; dmenu="d. Use a date range and time range search" ; emenu="e. Get call records" ; fmenu="f. Clean up search files" ; badchoice () { MSG="Invalid Selection... Please Try Again" ; } apick () { cat msisdnoutput.abbazabba | more; echo "\nPress Enter to return to menu"; read DUMMY; } bpick () { echo "Enter a range in the form YYMMDD-YYMMDD:>"; ./datesearch TTFILE* >> calltracedate.abbazabba; } cpick () { echo "Enter a range in the form HHMMSS-HHMMSS:>"; ./timesearch TTFILE* >> calltracetime.abbazabba; } dpick () { echo "Follow the trailing instructions:\n"; sleep 1; echo "Enter a search range in the form YYMMDD-YYMMDD"; echo "Then push the (ENTER) key, Next"; echo "Enter a search range in the form HHMMSS-HHMMSS"; echo "Push the (ENTER) key again and you're done!"; ./narrowtimesearch TTFILE* >> calltracenarrowtime.abbazabba; } epick () { echo "This choice makes call records readable then finds the number you are looking for.\n"; echo "NOTE: This process takes hours to complete because of the volume of data which is being searched.\n"; echo "NOTE: During the midpoint of this program you will be asked to supply a msisdn.\n"; echo "Press Enter to Continue"; read DUMMY; ./calltracesed; } fpick () { echo "This removes files you created during your call records search.\n"; echo "If you wish to keep these files resident on the system please choose 'n'.\n"; echo "Please remember to delete the files you created by using this menu when you no longer need them.\n"; echo "Press Enter to continue"; read DUMMY; echo "Please choose 'y' for (yes) or 'n' for (no)""\n"; ./calltraceremove; } themenu () { clear date echo echo "\t\t\t" $LOGO echo echo "\t\tNOTE: Search results can only be displayed after option 'd' has been completed." echo "\t\tNOTE: You must do an 'b' 'c' or 'd' search before executing option 'd'\n" echo "\t\tPlease Select:" echo echo "\t\t\t" $amenu echo "\t\t\t" $bmenu echo "\t\t\t" $cmenu echo "\t\t\t" $dmenu echo "\t\t\t" $emenu echo "\t\t\t" $fmenu echo "\t\t\tx. Exit" echo echo $MSG echo echo Select by pressing the letter and then ENTER; } MSG= while true do themenu read answer MSG= case $answer in a|A) apick;; b|B) bpick;; c|C) cpick;; d|D) dpick;; e|E) epick;; f|F) fpick;; x|X) break;; *) badchoice;; esac done