Track xdg-user-dirs
[khome.git] / home / bin / drafts_prepend
CommitLineData
76b7ee10
SK
1#! /bin/bash
2
3set -euo pipefail
4
5FILE="$HOME/doc/drafts/drafts.md"
6
7bar() {
8 seq -s - 80 | sed -E 's/[0-9]+//g'
9}
10
11header() {
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.051339 seconds and 4 git commands to generate.