Transferred from: https://zhidao.baidu.com/question/357781350.html
while Read-u3 i && Read-u4 J; Do Echo done34<bfile
Read-u3 I means to read a row of data in the I variable from FD # 3rd (file descriptor, filename descriptor), so you know what Read-u4 J means.
and 3<afile means redirect afile to 3rd FD, so you understand 4<bfile
So, the entire code
Done 3<afile 4<bfile
Reads the contents from Afile and bfile to I, J, and then uses the
For example, your afile content is
A
B
C
The content of bfile is
1
2
3
4
Then this program will print
A 1
B 2
C 3
Ask
Why write this 3<afile, not exec 3<afile, and not in front of the loop?
Chase Answer
Using the current notation, it is equivalent to redirecting only the while statement, while the 3,4 is gone after the end. If you use EXEC 3<afile 4<bfile in front of the while, the redirected 3,4 will persist from exec until the end of the script.
So for your code, since only in the while need to use afile bfile, that is the best way to do it now. If you want to continue to access after while, consider the way exec 3<afile.
Shell--read-u