Hi,
I want to read the list line by line and then want to compare these line
with filenames in the directory. When I use FOR loop it does it, but I am
not able to get the required result.
e.g.
linelist=" ###need to find files with these names in dir1 e.g.
file1=aaaaaaaaaa
aaaaaaaaaa
bbbbbbbbb
cccccccccc"
### dir1 consists of only two files called first, third
for lines in $linelist ; do
done
# I tried several combinations, so may the code above may not be completely
correct in syntax at this moment.
The output (foundfiles) from this is:
aaaaaaaaaa
cccccccccc
But, I want:
aaaaaaaaaa
### leaving this line blank because "bbbbbbbbbb" file was not
present in the directory
cccccccccc
Many thanks for your help