Bash: Find command to search multiple phrasses in each file?
Quote:
I mean i have around 30 phrasses and i dont want to do search 30 times, but only 1 time and search in file, you know to save io resources and time |
So where are you stuck ? Also, make it clear, do you want to search some particular files or want to serach some keyword in the file content?
You can use -name option, instead of grep piped with find cmd, like: Code:
find $wheretosearch -type f -size -800k -mmin -1440 -name "$phrasse" -print >> $outputfile |
And grep allows for alternatives... "phrase | phrase2 | phrase3"
|
Thank You,
so this is part of my find command: Quote:
the search phrasses will contain example this: url=<?php echo $rand_url;?> http://www \"ftp\" \'ftp\' :-O |
All times are GMT -5. The time now is 07:51 PM. |