annotate bin/log.sh @ 810:0afeb265da7f

fix formatting bug
author Jeff Hammel <k0scist@gmail.com>
date Fri, 28 Oct 2016 17:33:35 -0700
parents 6667850817bf
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
744
6667850817bf semi-generic log function
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
1 #!/bin/bash
6667850817bf semi-generic log function
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
2
6667850817bf semi-generic log function
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
3 BASEDIR=${HOME}/cisco/log
6667850817bf semi-generic log function
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
4 STAMP=$(date +"%Y%m%d")
6667850817bf semi-generic log function
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
5 FILENAME="${BASEDIR}/${STAMP}.txt"
6667850817bf semi-generic log function
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
6
6667850817bf semi-generic log function
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
7 if [[ -e "${FILENAME}" ]]
6667850817bf semi-generic log function
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
8 then
6667850817bf semi-generic log function
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
9 echo "emacs -nw +`wc -l ${FILENAME}` ${FILENAME}"
6667850817bf semi-generic log function
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
10 emacs -nw +`wc -l "${FILENAME}"`
6667850817bf semi-generic log function
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
11 else
6667850817bf semi-generic log function
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
12 emacs -nw ${FILENAME}
6667850817bf semi-generic log function
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
13 fi