Last active
November 5, 2015 20:04
-
-
Save 5car1z/b26477757b57be836bb9 to your computer and use it in GitHub Desktop.
Shell script for creating place-holder files in Nitrous zsh tutorial.
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/zsh | |
mkdir -p zsh_nitrous_test/{project_one,project_two}/html/{main,public}/ zsh_nitrous_test/{project_one,project_two}/css/{style,min}/ zsh_nitrous_test/{project_one,project_two}/js/{lib,test}/ | |
# create dummy files inside the html directories | |
for directory in zsh_nitrous_test/*/html/*; do | |
dd if=/dev/zero of="${directory}/homepage.html" bs=1024 count=1 | |
dd if=/dev/zero of="${directory}/about.html" bs=2048 count=1 | |
dd if=/dev/zero of="${directory}/contact.html" bs=4096 count=1 | |
done | |
# create dummy files inside the css directories | |
for directory in zsh_nitrous_test/*/css/*; do | |
dd if=/dev/zero of="${directory}/homepage.css" bs=1024 count=1 | |
dd if=/dev/zero of="${directory}/about.css" bs=2048 count=1 | |
dd if=/dev/zero of="${directory}/contact.css" bs=4096 count=1 | |
done | |
# create dummy files inside the js directories | |
for directory in zsh_nitrous_test/*/js/*; do | |
touch "${directory}/main.js" #plain-text non binary file | |
touch "${directory}/helper.js" #plain-text non binary file | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tree Output:
├── project_one
│ ├── css
│ │ ├── min
│ │ │ ├── about.css
│ │ │ ├── contact.css
│ │ │ └── homepage.css
│ │ └── style
│ │ ├── about.css
│ │ ├── contact.css
│ │ └── homepage.css
│ ├── html
│ │ ├── main
│ │ │ ├── about.html
│ │ │ ├── contact.html
│ │ │ └── homepage.html
│ │ └── public
│ │ ├── about.html
│ │ ├── contact.html
│ │ └── homepage.html
│ └── js
│ ├── lib
│ │ ├── helper.js
│ │ └── main.js
│ └── test
│ ├── helper.js
│ └── main.js
└── project_two
├── css
│ ├── min
│ │ ├── about.css
│ │ ├── contact.css
│ │ └── homepage.css
│ └── style
│ ├── about.css
│ ├── contact.css
│ └── homepage.css
├── html
│ ├── main
│ │ ├── about.html
│ │ ├── contact.html
│ │ └── homepage.html
│ └── public
│ ├── about.css
│ ├── about.html
│ ├── contact.css
│ ├── contact.html
│ ├── homepage.css
│ └── homepage.html
└── js
├── lib
│ ├── helper.js
│ └── main.js
└── test
├── helper.js
└── main.js
20 directories, 35 files