Use a Bash script to implement a foreach loop for iterating through items.
#!/bin/bash cd /var/www/vhosts for i in $( ls ); do echo $i done