diff options
| author | St33v <github@f3rr3t.com> | 2022-01-14 11:50:04 +1100 |
|---|---|---|
| committer | St33v <github@f3rr3t.com> | 2022-01-14 11:50:04 +1100 |
| commit | 4149819be6a0b3854719d71e95b9dea0ef2618c5 (patch) | |
| tree | ca2df8395887946b40d92222fb53ccd42e0f6d13 | |
| parent | 3c34728a7ac66fc5bbb8ddab991da99d1bb0f502 (diff) | |
print new entry and previous 9 to screen
| -rwxr-xr-x | super.sh | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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})" |
