{"action":"created","issue":{"url":"https://api.github.com/repos/denysdovhan/bash-handbook/issues/43","labels_url":"https://api.github.com/repos/denysdovhan/bash-handbook/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/denysdovhan/bash-handbook/issues/43/comments","events_url":"https://api.github.com/repos/denysdovhan/bash-handbook/issues/43/events","html_url":"https://github.com/denysdovhan/bash-handbook/issues/43","id":130179362,"number":43,"title":"IFS is confusing...","user":{"login":"sumbach","id":11580,"avatar_url":"https://avatars.githubusercontent.com/u/11580?v=3","gravatar_id":"","url":"https://api.github.com/users/sumbach","html_url":"https://github.com/sumbach","followers_url":"https://api.github.com/users/sumbach/followers","following_url":"https://api.github.com/users/sumbach/following{/other_user}","gists_url":"https://api.github.com/users/sumbach/gists{/gist_id}","starred_url":"https://api.github.com/users/sumbach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sumbach/subscriptions","organizations_url":"https://api.github.com/users/sumbach/orgs","repos_url":"https://api.github.com/users/sumbach/repos","events_url":"https://api.github.com/users/sumbach/events{/privacy}","received_events_url":"https://api.github.com/users/sumbach/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/denysdovhan/bash-handbook/labels/propose","name":"propose","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-31T20:44:24Z","updated_at":"2016-02-02T14:02:48Z","closed_at":null,"body":"I've always struggled with understanding the particulars of IFS and word splitting, so I'd like to try to give beginners as much help with this as possible.\r\n\r\n1. I think the default value of IFS is space, tab, and newline.\r\n2. It might be helpful to link to [Word splitting](http://www.gnu.org/software/bash/manual/html_node/Word-Splitting.html#Word-Splitting) in the Bash manual in case readers need the details."},"comment":{"url":"https://api.github.com/repos/denysdovhan/bash-handbook/issues/comments/178585477","html_url":"https://github.com/denysdovhan/bash-handbook/issues/43#issuecomment-178585477","issue_url":"https://api.github.com/repos/denysdovhan/bash-handbook/issues/43","id":178585477,"user":{"login":"sumbach","id":11580,"avatar_url":"https://avatars.githubusercontent.com/u/11580?v=3","gravatar_id":"","url":"https://api.github.com/users/sumbach","html_url":"https://github.com/sumbach","followers_url":"https://api.github.com/users/sumbach/followers","following_url":"https://api.github.com/users/sumbach/following{/other_user}","gists_url":"https://api.github.com/users/sumbach/gists{/gist_id}","starred_url":"https://api.github.com/users/sumbach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sumbach/subscriptions","organizations_url":"https://api.github.com/users/sumbach/orgs","repos_url":"https://api.github.com/users/sumbach/repos","events_url":"https://api.github.com/users/sumbach/events{/privacy}","received_events_url":"https://api.github.com/users/sumbach/received_events","type":"User","site_admin":false},"created_at":"2016-02-02T14:02:47Z","updated_at":"2016-02-02T14:02:47Z","body":"@bucaran Yes, definitely :confounded:\r\n\r\nThe *idea* of IFS and word-splitting isn't too complicated or difficult to understand, but the particulars are very tricky.\r\n\r\nI opened this issue to try to prompt a conversation about how IFS to explain/teach IFS. My personal inclination would be to recommend `IFS=\"\"` then point people to particular solutions for common problems:\r\n\r\n- [BashFAQ/001: How can I read a file (data stream, variable) line-by-line (and/or field-by-field)?](http://mywiki.wooledge.org/BashFAQ/001)\r\n- [BashFAQ/005: How can I use array variables?](http://mywiki.wooledge.org/BashFAQ/005)\r\n- [BashFAQ/020: How can I find and safely handle file names containing newlines, spaces or both?](http://mywiki.wooledge.org/BashFAQ/020)\r\n- [BashFAQ/050: I'm trying to put a command in a variable, but the complex cases always fail!](http://mywiki.wooledge.org/BashFAQ/050)\r\n- [BashFAQ/067: How can I trim leading/trailing white space from one of my variables?](http://mywiki.wooledge.org/BashFAQ/067)\r\n- [BashFAQ/100: How do I do string manipulations in bash?](http://mywiki.wooledge.org/BashFAQ/100)"}}