Last active
July 6, 2019 14:32
-
-
Save adoyle-h/ff0a94256489de643c6dade391c969ba to your computer and use it in GitHub Desktop.
VAR=VALUE some-command https://unix.stackexchange.com/a/264642 https://unix.stackexchange.com/a/458901
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
#!/usr/bin/env bash | |
set -o errexit | |
set -o nounset | |
set -o pipefail | |
shopt -s inherit_errexit | |
declare -a k | |
echo "IFS=$IFS" | |
IFS=',' k=( $(printf '1,2,3') ) | |
echo ${#k[@]} | |
echo "IFS=$IFS" |
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
#!/usr/bin/env bash | |
set -o errexit | |
set -o nounset | |
set -o pipefail | |
shopt -s inherit_errexit | |
declare -a k | |
echo "IFS=$IFS" | |
foo() { | |
k=( $(printf '1,2,3') ) | |
} | |
IFS=',' foo | |
echo ${#k[@]} | |
echo "IFS=$IFS" |
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
#!/usr/bin/env bash | |
set -o errexit | |
set -o nounset | |
set -o pipefail | |
shopt -s inherit_errexit | |
echo "IFS=$IFS" | |
IFS=',' echo '1,2,3' | |
echo "IFS=$IFS" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment