title: Strip leading dot from filenames bash script
body: <p>I have some files in a bunch of directories that have a leading dot and thus are hidden. I would like to revert that and strip the leading dot.</p>
  
  <p>I was unsuccessful with the following:</p>
  
  <pre><code>for file in `find files/ -type f`;
  do
  base=`basename $file`
  if [ `$base | cut -c1-2` = "." ];
  then newname=`$base | cut -c2-`;
  dirs=`dirname $file`;
  echo $dirs/$newname;
  fi
  done
  </code></pre>
  
  <p>Which fails on the condition statement:</p>
  
  <pre><code>[: =: unary operator expected
  </code></pre>
  
  <p>Furthermore, some files have a space in them and file returns them split.</p>
  
  <p>Any help would be appreciated.</p>