Automated_Journal_VimWiki/scripts/utils/journals.sh

9 lines
214 B
Bash
Raw Normal View History

2023-06-14 19:15:13 +00:00
#!/usr/bin/bash
function get_journals () {
local JOURNAL_REGEX='[0-9]{4}-[0-9]{2}-[0-9]{2}.wiki'
[[ "$1" ]] && declare -n hashmap="$1"
hashmap=( $( ls $JOURNAL_DIR -1 | grep -Eo $JOURNAL_REGEX | sort -n ) )
}