Finding all writable directories starting from the “/” directory and run a command on that directories with use a bash script

I want to create a bash script, this script should find all the directories that are writable by the user running the script starting from the “/” directory and run any command on those directories. Can anyone write a bash script example like this?

Something like this:

for i in `find / -type d 2>/dev/null`
	[[ -w $i ]] && echo "+w: $i"

Take look at the following


Linux sysadmin blog - Linux/Unix Howtos and Tutorials - Linux bash shell scripting wiki