Foreach loop with Bash

Loops around a directory and echos each folder.

 


Author: Anonymous
Added: Wednesday, 21 May, 2014
Category: Git

Code

#!/bin/bash

cd /var/www/vhosts

for i in $( ls ); do
   echo $i
done

Comments