When bash is executing a script, ls -la /proc/<pid of bash>/fd
shows "255 -> /path/to/script".
I think that bash reads the script via file discriptor 255, and executes the commands line by line.
But when bash is sourcing a script, I can't find such an entry in ls -la /proc/<pid of bash>/fd
.
I can't find in cat /proc/<pid of bash>/maps
, either.
I have a question: When bash sources a script, how does bash read the script? Is there any special way to read the script file?