comparison 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
comparison
equal deleted inserted replaced
743:51ef69da82fb 744:6667850817bf
1 #!/bin/bash
2
3 BASEDIR=${HOME}/cisco/log
4 STAMP=$(date +"%Y%m%d")
5 FILENAME="${BASEDIR}/${STAMP}.txt"
6
7 if [[ -e "${FILENAME}" ]]
8 then
9 echo "emacs -nw +`wc -l ${FILENAME}` ${FILENAME}"
10 emacs -nw +`wc -l "${FILENAME}"`
11 else
12 emacs -nw ${FILENAME}
13 fi