annotate bin/log.sh @ 902:06d2cc0fe045

add signing key
author Jeff Hammel <k0scist@gmail.com>
date Thu, 16 Nov 2023 05:57:09 -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