[sf-lug] bash: identifying directories

Matt Price matt.price at utoronto.ca
Tue Jun 3 11:10:14 PDT 2008

another little scripting question:

i'd like this tiny script i'm writing to scan the current directory,
identify the subdirectories, and then do something in each of them.  so
in pseudocode:

[find dirs]

for DIR in $dirs ; do 
	cd $DIR
	[do some stuff]
	cd ..

is this trivial to do?  20 minutes with the abs-guide hasn't given me
the answer yet...  

thanks much!


Matt Price
matt.price at utoronto.ca

More information about the sf-lug mailing list