title: How do I run a command in a list of directories using bash?
body: <p>I need to run some commands in OS X User directories, apart from "Shared" and our local admin account.
  So far, I have:</p>
  
  <pre><code>#!/bin/bash
  userFolders=$(find /Users/ -type d -depth 1 | sed -e 's/\/\//\//g' | egrep -v "support|Shared")
  for PERSON in "$userFolders"; do
      mkdir $PERSON/Desktop/flagFolderForLoop
  done
  </code></pre>
  
  <p>Running the above as root, I get</p>
  
  <pre><code>mkdir: /Users/mactest1: File exists
  </code></pre>
  
  <p>Where might I be going wrong?</p>