This page is a temporary clearinghouse for utilities and techniques for managing large numbers of sites simultaneously.
Open all sites
It is often helpful to be able to open all stage or main sites at once. Rather than typing the name of each of the sites into individual browser tabs, a combination of find and cut allow this to be done with a single command. These utilities are written with the expectation that all local sites will reside in a single directory, and that the site root for each site will reside in a subdirectory named stage.
Add this code to your .bashrc, .bash_profile, or .zshrc file and you can open all stage sites with stages or all main sites with mains.
# Open all stages to status pagefunction stages() { find ./ -type d -name stage -maxdepth 2 \ -exec bash -c ' NAME="$(cut -d / -f 2 <<< \"$1\")"; open https://stage.$NAME.gatech.edu/admin/reports/status ' bash {} \;}
# Open all mains to status pagefunction mains() { find ./ -type d -name stage -maxdepth 2 \ -exec bash -c ' NAME="$(cut -d / -f 2 <<< \"$1\")"; open https://$NAME.gatech.edu/admin/reports/status ' bash {} \;}
If you're interested in understanding how these work:
find ./ -type d -name stage -maxdepth 2 \
This searches your main project directory for all subdirectories that contain a folder namedstage.-exec bash -c '
For each subdirectory found, span a shell.NAME="$(cut -d / -f 2 <<< \"$1\")";
Assign the second element of the found path to$NAME. E.g. if find returns./site1/stage,$NAMEwill be set tosite1.open https://stage.$NAME.gatech.edu/admin/reports/status
Constructs the stage URL, substituting$NAMEwhere appropriate, and opens it in the default browser.