Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Need help to search for a string pattern in all files inside a directory

Priya Dubey-OracleJul 8 2020 — edited Jul 14 2020

Hi All,

I need to find a string pattern say "%end%" (to match all possible words like 'amend','agenda') , withing all the files inside a directory say '/temp/home'.

I worked on some GREP command variations but none of them seems to give the desired output.

Note:

1.)This search is to query 'shell scripts' file type and not .txt files

2.)The string has to be searched withing all the files of the directory, and not in the filenames of the directory

Any suggestion/command/script will do for this solution which i can run on my unix/linux

Thanks in advance for helping!

Thanks,

Priya

Comments
Post Details
Added on Jul 8 2020
7 comments
861 views