annotate bin/log.sh @ 845:70ae14b6be51

[sync] ~/k0s is no longer in PATH as it corrupts PYTHONPATH
author Jeff Hammel <k0scist@gmail.com>
date Thu, 17 Aug 2017 09:48:49 -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