We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1fe98f9 commit d3fbb54Copy full SHA for d3fbb54
add_zeroes.sh
@@ -16,10 +16,10 @@ do
16
done
17
18
# _CodingChallenges
19
-for i in $(find _CodingChallenges/ -maxdepth 1 -name [0-9]* | cut -b 19-)
+for i in $(find _CodingChallenges/ -maxdepth 1 -name [0-9]* | cut -b 19- | sed 's/.md$//')
20
do
21
echo "Renaming $i => 0$i"
22
grep -rInEl $i . | xargs -r -L 1 -o sed -i -e "s/$i/0$i/g"
23
- mv "_CodingChallenges/$i" "_CodingChallenges/0$i"
24
- sed -i "3iredirect_from: CodingChallenges/`echo $i | sed 's/.md$/.html/'`" "_CodingChallenges/0$i"
+ mv "_CodingChallenges/$i.md" "_CodingChallenges/0$i.md"
+ sed -i "3iredirect_from: CodingChallenges/$i.html" "_CodingChallenges/0$i.md"
25
0 commit comments