Some operations (such as restarting a service) break when changing the IFS variable in the script. Reproducible: Always Steps to Reproduce: 1. Create the following init script: #!/sbin/runscript start() { ebegin "start" IFS="" eend 0 } stop() { ebegin "stop" IFS="" eend 0 } 2. Start the service 3. Restart the service Actual Results: Syntax errors Expected Results: Whenever a script (or a function, such as stop or start) finishes, runscript should restore the variables, IFS among them. This specific script can be repaird as follows: #!/sbin/runscript start() { ebegin "start" IFS="" IFS=$' \t\n' eend 0 } stop() { ebegin "stop" IFS="" IFS=$' \t\n' eend 0 } #eof At the moment, I advice all programmers to store a backup of the important variables and restore them at the end of the script. In this workaround I've restored the default bash value for IFS, which runscript expects.
Rather make all variable you change local, which should be the good bash practice: ----- $ (foo(){ local IFS="|"; echo "$*"; }; foo bar boo ban) bar|boo|ban -----