view bin/log.sh @ 744:6667850817bf

semi-generic log function
author Jeff Hammel <k0scist@gmail.com>
date Sun, 28 Jun 2015 15:28:56 -0700
parents
children
line wrap: on
line source

#!/bin/bash

BASEDIR=${HOME}/cisco/log
STAMP=$(date +"%Y%m%d")
FILENAME="${BASEDIR}/${STAMP}.txt"

if [[ -e "${FILENAME}" ]]
then
    echo "emacs -nw +`wc -l ${FILENAME}` ${FILENAME}"
    emacs -nw +`wc -l "${FILENAME}"`
else
    emacs -nw ${FILENAME}
fi