I want to create an alias to append a dated note to a file. (The use case I want to reproduce : Sebastian Daschner - How to do effective note taking as developer.
So far I was able to append the date, but I cannot figure out a way to append both the date and the note from user input.
Usage
append-to-file 'my text'
Expected result in file.txt
2021-08-30 : some previous text
2021-09-01 : my text
The alias I have written so far
alias append-to-file='tee -a file.txt <<< $(echo $(date -I) :)'