annotate bin/log.sh @ 823:3b767ffdd55e

chmod u+x
author Jeff Hammel <k0scist@gmail.com>
date Mon, 06 Feb 2017 09:30:11 -0800
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