Last active
November 14, 2016 16:54
-
-
Save edgabaldi/f584a0bab637d8263fea908326cb7664 to your computer and use it in GitHub Desktop.
BASH Shell: For Loop File Names With Spaces
This file contains hidden or 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
SAVEIFS=$IFS | |
IFS=$(echo -en "\n\b") | |
for f in $(ls | grep -v git | grep -v salvar_documentos.py | grep -v dt18) | |
do | |
mv $f dt18/ | |
done | |
IFS=$SAVEIFS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment