Track xdg-user-dirs
[khome.git] / home / bin / notes_prepend
1 #! /bin/bash
2
3 set -euo pipefail
4
5 FILE="$HOME/doc/notes/notes.md"
6
7 bar() {
8 seq -s - 80 | sed -E 's/[0-9]+//g'
9 }
10
11 header() {
12 printf 'untitled\n'
13 bar
14 date +'started: %Y-%m-%d %H:%M:%S %z'
15 printf '\n\n'
16 }
17
18 (header && cat "$FILE") | sponge "$FILE" # sponge is in moreutils package
This page took 0.086883 seconds and 4 git commands to generate.