Tool that I find very helpful and use everyday, can't be that bad if it's just one line right?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# TODO: | |
# if not args then display notes | |
notefile="/home/mark/notes.txt" | |
# this script does not seem safe to me, but if only I use it it's fine, definitly very explotiable though | |
echo "$(date -Iminutes)" "$@" >> "$notefile" |
Thank you! I am now using your version :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Brilliant! Here's my take on your script with the following changes:
Output the contents of the note file if no arguments are passed.
Updated hardcoded path to note file to use
$HOME
instead.Updated date command to be more portable
date
under macOS doesn't have a-I
option. A portable solution is to use+%FT%H:%M
instead.