Created
January 25, 2009 13:33
-
-
Save bradwright/51788 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Useful snippet if you have a list of files with spaces in their names | |
# (I'm looking at you, OS X) | |
# path separators so I can use spaces in filenames | |
OLD_IFS=${IFS} | |
# just use a linebreak and remove the space character | |
IFS=" | |
" | |
select opt in $list_of_files_with_spaces ; do | |
echo $opt | |
# repair IFS | |
IFS=${OLD_IFS} | |
exit 0 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment