Skip to content

Instantly share code, notes, and snippets.

@furtive
Created August 29, 2012 20:31
Show Gist options
  • Save furtive/3518506 to your computer and use it in GitHub Desktop.
Save furtive/3518506 to your computer and use it in GitHub Desktop.
Stop BASH loops from acting strange when filenames have spaces in them
#this replaces the default separator (a space) with a character combination unlikely to be found in a file name.
SAVEIFS=$IFS
IFS=$(echo -en "\n\b")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment