Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #DIRECTORIES=`ls -lQ|grep ^d|cut -f 2 -d '"'`
- DIRECTORIES=`find -maxdepth 1 -type d -print`
- for DIRECTORY in ${DIRECTORIES}
- do
- if [ -d ${DIRECTORY} ]; then
- # do something on the directory
- fi
- done;
Advertisement
Add Comment
Please, Sign In to add comment