#!/bin/csh -f # Linux version of logsum # just does weather and time logs # accesses log files from /home/gbtlogs/ # i.e., recent logs # March 10, 2010 - FDG - NRAO-GB # version for red hat 7 -- FDG Sept 3, 2019 set sys=`uname` echo $sys if($sys != "Linux") then echo "This version only works on Linux systems." exit endif set bdir = "/users/fghigo/bin" set cdir = "/home/astro-util/src/cscripts" set wsta = "2" set tel = "0" # get the type of logs echo -n "Select (1)Time, (2)RT phase, (3)GBT Weather : " set tel = $< switch($tel) case "1": echo "Time" breaksw; case "2": echo "RT phase" breaksw; case "3": echo -n "Please select station 1, 2, or 3 : " set wsta = $< if( $wsta != "1" && $wsta != "2" && $wsta != "3") then echo "no station $wsta" exit endif echo "Selected weather station $wsta" breaksw; case "h": case "H": echo "Help" breaksw; default: echo "Try again with either 1, 2, or 3"; exit endsw # get the desired time/date range echo -n "Choose (1)date/time range, (2)last n days : " set tchoice = $< set ndays="-1" switch($tchoice) case 1: echo -n "starting date[hour] (yyyymmdd[hh]): " set mmdd1 = $< echo -n "ending date[hour] (yyyymmdd[hh]): " set mmdd2 = $< set datesel = "-d $mmdd1 $mmdd2" breaksw; case 2: echo -n "number of days: " set ndays = $< set datesel = "-n $ndays" breaksw; default: echo "Try again with 1 or 2:" exit; endsw # do the time - 1pps processing if ($tel == "1") then $cdir/timelogsum7.csh $bdir $wsta $datesel endif # do the rt phase processing if ($tel == "2") then $cdir/rtlogsum7.csh $bdir $wsta $datesel endif # do the weather processing if ($tel == "3") then $cdir/wxlogsum7.csh $bdir $wsta $datesel endif