I want to run a bash command on output from Drupal's drush command-line interface. drush site-alias returns a list of webroots, first showing the name of the group, and then each site in that group. The site itself is aliased in the form group.site. For instance, you might getinternalinternal.site1internal.site2externalexternal.site1external.site2marketingmarketing.site1marketing.site2I want to do a command on each of the site aliases, but not on the group alias itself. I need to test if the string has a period in it, and if so, run it:for i in $(drush site-alias); do {if no period) drush $i command; done;How can I run this test?
Test if a string has a period in it with bash
bash;string
You can use pattern matching:for i in $(drush site-alias) ; do    if [[ $i == *.* ]] ; then        drush $i command    fidone