I think you can prefix the called function with IFS=$OLDIFS. I.e.: IFS=$OLDIFS Rays_function E.g.: function a { ; echo $a ; } : ~ Tue 3 16:37; a=foo : ~ Tue 3 16:37; a foo : ~ Tue 3 16:37; a=bar a bar : ~ Tue 3 16:37; a foo On Tue, Aug 3, 2021 at 4:15 PM Ray Andrews wrote: > I have a function that requires this: > > local IFS=$'\n' > > ... but the function calls other functions in which I need to protect > $IFS from that change. Can I limit the scope? As it is I'm laboring it > with this: > > In the calling function: > > local OLDIFS="$IFS" > local IFS=$'\n' > > In the called function: > > IFS=$OLDIFS > > code ... > code ... > > IFS=$'\n' > return > > ... there's got to be a more streamlined way. > > >