Skip to content

Instantly share code, notes, and snippets.

@shdbwa
Last active July 31, 2021 15:17
Show Gist options
  • Save shdbwa/26218b455675775fb488f2437674b91d to your computer and use it in GitHub Desktop.
Save shdbwa/26218b455675775fb488f2437674b91d to your computer and use it in GitHub Desktop.
Spaces and bash scripts _ IFS custom
#!/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