Consider this. IFS is set only in the execution of read.
IFS='' read -r REPLY
However, if I do similar with . (source), the variable will be assigned and changed even after the execution of the line of code.
PATH="/new_path:${PATH}" . script.sh
echo "$PATH" # valueValue changed
Why would this happen? I thought ., as well as Bash's source, is a command just like read or echo. Is there any documentation, e.g., https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_142.14. Special Built-In Utilities, mentioning about this behaviour?
How can I temporarily set $PATH and . (source) a file, in the POSIX compliant way?