annotate bin/log.sh @ 867:002c1e85ff30

prune docker volumes
author Jeff Hammel <k0scist@gmail.com>
date Wed, 18 Jul 2018 11:18:32 -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