head	1.1;
access;
symbols
	Hobson_Rock_14Dec2009:1.1
	HEAD_CTD_MERGE:1.1.0.4
	BEFORE_VCS_CHANGE:1.1
	Hobson_Rock_16Oct2009:1.1
	Hobson_Rock_29June2009:1.1
	mar19_2009:1.1
	mar18_2009:1.1
	feb13_2009:1.1
	feb10-2009:1.1
	feb09-2009:1.1
	dec15_2008:1.1
	dec12_2008:1.1
	ST_10_5:1.1
	ST_10_4b:1.1
	ST_10_4:1.1
	ST_10_3:1.1
	ST10_HW:1.1
	ST_10_2:1.1
	ST_10_1:1.1
	ST_10_0:1.1
	AUTONOMY_BRANCH:1.1.0.2
	AUTONOMY:1.1
	AUTONOMY-2008_07_30:1.1;
locks; strict;
comment	@# @;


1.1
date	2005.05.26.22.49.43;	author rob;	state Exp;
branches;
next	;


desc
@@


1.1
log
@Initial submission.  This is a bash shell script that searches syslog and
extracts the waypoint information to build waypoint.m
@
text
@#!/bin/bash
#
# Make sure that this program can delete it's temporary files.
  umask o+rwx
#
# If the mission had waypoints, gobble up syslog and extract 
# waypoint information.
#
  if [ -s syslog ]
  then
    grep wplog syslog > temp.txt
  else
    echo "Syslog is empty."
  exit -1
  fi

  if [ -s temp.txt ]
  then
    echo "Extracting waypoints from syslog."
  else
    exit -1
  fi
  #
  # This gnarly sed command inserts a ' at the start and end of each line.
  #
  cat temp.txt | sed 's/^/'\''/' | sed 's/$/'\''/' > temp1.txt

  echo "dataWPstr = [ ... " > waypoint.m
  cat temp1.txt >> waypoint.m
  echo " ];" >>    waypoint.m

  rm temp.txt
  rm temp1.txt
@
