Created
September 7, 2019 03:34
-
-
Save achiku/86bfd8839ececd959edcf5ac8b611422 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# $ for i in $( find -E ~/Documents/howm/achiku -type d -regex ".*/achiku/[0-9]{4}/[0-9]{2}"); do ./howm2memolist.sh $i; done | |
p=${1} | |
for i in $( ls $p ); do | |
title=$( sed -n '1p' ${1}/${i} | sed -e 's/^# //' -e 's;/;;g') | |
n=$( echo ${i} | sed -E -e 's/([0-9]{4}-[0-9]{2}-[0-9]{2}-[0-9]{4})[0-9]{2}.md/\1/' ) | |
cp ${1}/${i} "/Users/chiku/Documents/memolist/achiku/${n}-${title}.md" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment