@@ -0,0 +1,23 @@
6+for file in $(find -type f -name \*.md); do
7+ [[ $file == *_index.md ]] && continue
8+ echo $(grep -m 1 "weight = " $file | sed 's/^weight = //') $file
9+done | sort -n > weights
13+read -p "Edit weights and press enter to continue..."
15+# for each line in weights file, read values weight and file, and update
17+cat weights | while read weight file; do
19+ sed -i'' "s/^weight = [.0-9]*/weight = $weight/" $file