Skip to content

Instantly share code, notes, and snippets.

@marc0der
Created November 15, 2012 09:59
Show Gist options
  • Save marc0der/4077772 to your computer and use it in GitHub Desktop.
Save marc0der/4077772 to your computer and use it in GitHub Desktop.
Iterate over files with spaces in names with bash
find -d /some/directory -type f -depth 1 | grep $ | while read file; do
#perform some work on $file here
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment