Grep expression with special file names

I need to go via some normal documents in directory sites and also locate those documents, that have their very own name in its web content.

In the adhering to item of manuscript is a cycle in which I am experiencing courses and also making use of grep to locate the documents is name in its web content. What is undoubtedly proper is $something: q - is array of courses where i need to locate documents. The next variable is name in which is just name of existing documents. as an example:/ home/computer/text. txt (courses) and also: text.txt (name)

And my largest trouble is to locate names of documents in their web content. It is fairly hard for me to write proper grep for this, create the names of documents and also directory sites that I am travelling through seethe. Below are several of them:

/home/OS/pocitacove/testovaci_adresar/z/test4.pre_expertov/!_1
/home/OS/pocitacove/testovaci_adresar/z/test4.pre_expertov/dam/$user/:e/'/-r
/home/OS/pocitacove/testovaci_adresar/z/test3/skusime/ taketo/   taketo
/home/OS/pocitacove/testovaci_adresar/z/test4.pre_expertov/.-bla/.-bla/.a=b
/home/OS/pocitacove/testovaci_adresar/z/test4.pre_expertov/.-bla/.-bla/@
/home/OS/pocitacove/testovaci_adresar/z/test4.pre_expertov/.-bla/.-bla/:
/home/OS/pocitacove/testovaci_adresar/z/test4.pre_expertov/.-bla/.-bla/'ano'

foreach paths ($something:q)
    set name = "$paths:t"
    @ number = (`grep -Ec "$name" "$paths"`)

    if ($number != 0) then
        echo -n "$paths "
        echo $number
    endif

    @ number = 0
end
1
2022-07-25 20:41:26
Source Share
Answers: 0