p8952 / bocker

Docker implemented in around 100 lines of bash
https://www.p8952.info/
GNU General Public License v3.0
11.29k stars 718 forks source link

default $IFS is not `unset` #18

Closed chino closed 9 years ago

chino commented 9 years ago

Note in bocker_pull there is a call to manipulate $IFS and then an attempt to revert it by using unset IFS however the default $IFS is actually $' \n\t'. Unsetting $IFS like that I believe will globally affect white space splitting.

~ $ [[ $IFS == $' \t\n' ]] && echo true
true
~ $ read a b <<< "1 2"; echo $a
1
~ $ IFS='' read a b <<< "1 2"; echo $a
1 2
p8952 commented 9 years ago

Thanks, sorted in 4956a537b75d2217ae8bcca7057acc22f6977722