I have a text file (base.txt) which consist list of files to be searched like:
base.txt
abc.txt
def.txt
fgh.txt
Now i am going to search all the listed files in another directory after reading them one by one, once i found the file in the directory then i want to copy it to another location.
On slower machines a while back, writing scripts that open files with cat and then piping the ouptut into a program that could have opened the file all by itself got dubbed 'UUOC'.
It creates an extra process. On machines with more limited resources UUOC was discouraged, and still is, as a waste of system resources. An extension of that, creating way more child processes than need inside a loop is still a major performance issue.