From 4149819be6a0b3854719d71e95b9dea0ef2618c5 Mon Sep 17 00:00:00 2001 From: St33v Date: Fri, 14 Jan 2022 11:50:04 +1100 Subject: print new entry and previous 9 to screen --- super.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'super.sh') diff --git a/super.sh b/super.sh index c76aeaa..325f86d 100755 --- a/super.sh +++ b/super.sh @@ -8,7 +8,6 @@ theDate=$(\date -I) # ISO 8601, natch # Where to store the log file logFile=~/box/leger/etc/superLog.txt - # to log a value, the user must include it as an argument if [ -z $1 ] then @@ -16,6 +15,8 @@ if [ -z $1 ] exit 1 fi -echo $theDate $1 >> $logFile - +echo $theDate,$1 >> $logFile +#printf '%s,%s\n' $theDate ,$1 >> $logFile +# Note: double quote expression to preserve carriage returns (thanks, stackoverflow) +echo "$(tail ${logFile})" -- cgit v1.3