Skip to content

Instantly share code, notes, and snippets.

@fs111
Created June 25, 2013 11:21
Show Gist options
  • Save fs111/5857739 to your computer and use it in GitHub Desktop.
Save fs111/5857739 to your computer and use it in GitHub Desktop.
# thing to parse
foo="1.2.3"
# spilt in array
IFS=. read -a arr <<< $foo
echo ${arr[0]}
# prints 1 2 3 and not just 1, as I expected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment