Last active
July 31, 2021 15:17
-
-
Save shdbwa/26218b455675775fb488f2437674b91d to your computer and use it in GitHub Desktop.
Spaces and bash scripts _ IFS custom
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
#!/bin/bash | |
SAVEIFS=$IFS | |
IFS=$(echo -en "\n\b") | |
# set me | |
FILES=/data/* | |
for f in $FILES | |
do | |
echo "$f" | |
done | |
# restore $IFS | |
IFS=$SAVEIFS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment