]>
us-delaporte.pagekite.me Git - minion.git/blob - bin/mma
2 # mma - minion move to archive
3 # Moves all matching files to $HOME/Journal/archive_YYYY/
6 # File to gather all content into
9 echo "A topic to archive is required."
12 archive
="$HOME/Journal/archive-$year/"
14 files
=$(find $HOME/Journal/$year -type f -iname "*$1*\.md")
15 if [ -n "$files" ]; then
16 echo "Will archive $files to $archive"
18 echo "Nothing to archive for $topic"
22 read -n1 -p "Continue? [y,N]" input
24 if [[ ! $input == "Y" && ! $input == "y" ]]; then
25 echo "Aborted by user"