IFS 变量是否在以下更改?

Is the IFS Variable Changed in the following?

下面的代码片段是我用来确定文件系统中文件所在位置的路径和文件名的内容。

for index in "${!files[@]}"

    do
    (find . -type f -name "${files[index]}" -print0) 2>&1 | while IFS= read -r -d $'[=10=]' line; do
        if [[ ${line} == ${search_pattern}* ]]
        then
             relative_path=$(echo "$line"|awk '{print substr([=10=],2)}')
             file_path=$(echo "$(pwd)$relative_path" |awk -F/ '{$NF=""; print [=10=]}'|sed -e 's/ /\//g')
             file_name=$(echo "$(pwd)$relative_path" |awk -F/ '{print $NF}')
    .................................................................

我的问题是关于线路的,

"while IFS= read -r -d $'[=11=]' line; do"

之前我在 find 命令上使用了 for 循环。但是Whosebug上有个post说这样更好更正确。我试过了,它起作用了,但不太明白。此行是否会以任何方式改变 IFS,从而影响主要 shell?我试图弄明白,因为我不太精通 SHELL 脚本,我无法理解该行的作用。

我不想在生产系统中部署它,然后发现其他脚本失败,因为 IFS 变量已更改。

当您使用 read 命令内联执行对 IFS 的赋值时,变量的值会在命令执行期间更改,但在命令完成后不会保持更改。

引用 Simple Commands in the spec 中的相关部分(强调我的):

If no command name results, variable assignments shall affect the current execution environment. Otherwise, the variable assignments shall be exported for the execution environment of the command and shall not affect the current execution environment (except for special built-ins). If any of the variable assignments attempt to assign a value to a read-only variable, a variable assignment error shall occur. See Consequences of Shell Errors for the consequences of these errors.

Unix & Linux Stack Exchange 上有大量与此问题相关的答案。