summaryrefslogtreecommitdiff
path: root/super.sh
diff options
context:
space:
mode:
authorSt33v <github@f3rr3t.com>2022-01-14 11:50:04 +1100
committerSt33v <github@f3rr3t.com>2022-01-14 11:50:04 +1100
commit4149819be6a0b3854719d71e95b9dea0ef2618c5 (patch)
treeca2df8395887946b40d92222fb53ccd42e0f6d13 /super.sh
parent3c34728a7ac66fc5bbb8ddab991da99d1bb0f502 (diff)
print new entry and previous 9 to screen
Diffstat (limited to 'super.sh')
-rwxr-xr-xsuper.sh7
1 files changed, 4 insertions, 3 deletions
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})"