Better HN
topnewbestaskshowjobs
Log inSign up

john398053

1 karma · joined Jul 18, 2014 (12y ago) · 1 submissions

Submissions

comment 12y ago · link · parent

Regarding setting $IFS:

  for arg in $@; do
A better way to do it is to quote it:

  for arg in "$@"; do
because then you can capture newlines and tabs. Bash will automatically convert it to separate parameters, even though there is only one quoted variable.