Created
March 20, 2018 05:17
-
-
Save paikwiki/2a09dfbbfe10ce5d6a16317ca5b16e7f to your computer and use it in GitHub Desktop.
Make markdown files for gitbook
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 | |
# names : names of files | |
# dirName : target directory | |
names=("section01.md" | |
"section02.md" | |
"section03.md" | |
"section04.md" | |
"section05.md" | |
"section06.md") | |
dirName="docs/ch01/" | |
# If target directory doesn't exist, make it | |
if [ ! -d $dirName ] | |
then | |
mkdir -p $dirName | |
fi | |
# Create empty files from names | |
for name in "${names[@]}"; do | |
touch ${dirName}$name | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment