Skip to content

Instantly share code, notes, and snippets.

@parkerl
Created December 14, 2011 23:32
Show Gist options
  • Select an option

  • Save parkerl/1479105 to your computer and use it in GitHub Desktop.

Select an option

Save parkerl/1479105 to your computer and use it in GitHub Desktop.
Iterate directories in bash
#!/bin/bash
src="/my/path"
for dir in `ls "$src/"`
do
if [ -d "$src/$dir" ]; then
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment