6 lines
333 B
Bash
6 lines
333 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
find content/qml -type f -name "*.md" -exec sed -i '1 s/#/---\ntitle:/; 1 s/.*[^0-9]\([0-9]\+\)[^0-9]*$/\0\nnumber: \1/;1 s/$/\n---\n/; s|\.\./|/|g' {} \;
|
||
|
find content/python -type f -name "*.md" -exec sed -i '1 s/#/---\ntitle:/; 1 s/.*[^0-9]\([0-9]\+\)[^0-9]*$/\0\nnumber: \1/;1 s/$/\n---\n/; s|\.\./|/|g' {} \;
|
||
|
|
||
|
exit 0
|