I have piece of code and want it to search for a string in a particular path. The script will take input strings from an input file using a while loop. Basically, I want to read that file line by line and try to find out whether the content of that line exists in the particular path or not.
#!/bin/bash
filename='/input.txt'
path=/
while read -r line
do
res=`ls -l $path | grep $line`
echo "$res"
done < "$filename"