/[MITgcm]/mitgcm.org/scripts/process_emails
ViewVC logotype

Diff of /mitgcm.org/scripts/process_emails

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.4 by jmc, Fri Feb 29 01:51:27 2008 UTC revision 1.9 by jmc, Thu Jan 11 21:59:04 2018 UTC
# Line 10  Line 10 
10  #EOF  #EOF
11    
12  #-- build munpack if needed:  #-- build munpack if needed:
13  unpck=/u/u2/jmc/testing/tools_mpack/munpack  unpck=$HOME/testing/tools_mpack/munpack
14  if test ! -x $unpck ; then  if test ! -x $unpck ; then
15   MPACKDIR=`dirname $unpck`   MPACKDIR=`dirname $unpck`
16   cd $MPACKDIR   cd $MPACKDIR
17   ./configure && make   ./configure && make
18  fi  fi
19    unpck=$HOME/testing/munpack.$HOSTTYPE
20    #ls -l $unpck
21    
22    #-- create a daily log file (if not already there)
23    cd $HOME/testing/logs
24    logpfx="prc_emails_" ; sfx=`date +%m%d`
25    logfile="../logs/${logpfx}$sfx"
26    if test -e $logfile ; then :
27    else
28    #-- clean-up old log files:
29      echo -n '-- in dir: ' ; pwd
30      n=$(( `ls ${logpfx}* | wc -l` - 10 ))
31      if test $n -gt 0 ; then
32      echo -n ' remove files: '
33        ls -lt ${logpfx}* | tail -"$n"
34        ls -t  ${logpfx}* | tail -"$n" | xargs rm -f
35      fi
36      echo ' create new log file:' $logfile
37      touch $logfile
38      echo "Log file created from '"`hostname`"' by '$USER' on:" `date` >> $logfile
39      chmod 664 $logfile
40    fi
41    
42  #-- parse emails :  #-- parse emails :
43  cd /u/u2/jmc/testing/front_content && ./parse_emails -u $unpck -v -a jmc@ocean.mit.edu  cd $HOME/testing/front_content && ./parse_emails -u $unpck -a jmc@ocean.mit.edu >> $logfile 2>&1
44    

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.9

  ViewVC Help
Powered by ViewVC 1.1.22