Created
November 11, 2015 08:20
-
-
Save apperceive/a05c576accc6a9249724 to your computer and use it in GitHub Desktop.
bash command line to iterate over a pattern of folders and create index.html's with name inside
This file contains hidden or 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
for f in $(find /var/www -maxdepth 2 -type d -regextype awk -regex '.*(dev|test)\.apperceive\.(com|net)' -exec echo {} \;); do echo "Welcome to $f" | sed 's~/var/www/html/~~' > $f/public/index.html; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment