Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I need help writing a search unix script. I have a .txt file with a long list of files. I would like to know is there a way to write a script that will search a entire directory and/or folders inside that directory for each line of the txt file?
For Example:
The list.txt file has the following:
smile.img
difp.img
mrew.crv
etc., etc., etc..The script will search the designated directory, first for smile.img, and if it's found, output it to another txt file called found.txt. Then go to the next line, difp.img, search, then mrew.crv, search, etc....
So at the end of the search, I will have found.txt that contains "found" files. and if none are found. Say, "No duplicates Found"I've researched online as much as possible, but no luck finding help.

This looks like homework, but I'll give you part of it:
while read fname
do
find $fname -type f -printdone < list.txt

![]() |
Easiest Question EVER?
|
sed - How to do condition...
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |