changeset 744:6667850817bf

semi-generic log function
author Jeff Hammel <k0scist@gmail.com>
date Sun, 28 Jun 2015 15:28:56 -0700
parents 51ef69da82fb
children 6194eec4e3b7
files bin/log.sh
diffstat 1 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/log.sh	Sun Jun 28 15:28:56 2015 -0700
@@ -0,0 +1,13 @@
+#!/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