5 DEFAULT_BASE
="$HOME/doc/drafts/adhoc"
8 local -r len
="${1:-80}" # 1st arg or 80.
9 local -r char
="${2:--}" # 2nd arg or a dash.
11 seq -s "$char" "$len" |
sed -E 's/[0-9]+//g'
15 local -r base
="${1:-$DEFAULT_BASE}"
17 local -r title_given
='Untitled'
18 local -r title_lower
=$
(echo "$title_given" |
tr '[:upper:]' '[:lower:]')
19 local -r title_lower_dashed
=$
(echo "$title_lower" |
sed 's/\s\+/-/g')
20 local -r timestamp
="$(date --iso-8601=ns)"
21 local -r file="${base}/${timestamp}--${title_lower_dashed}.md"
30 echo "started: $timestamp"
This page took 0.069433 seconds and 4 git commands to generate.