Guest postcd Posted June 21, 2014 Posted June 21, 2014 Quote: declare -a phrasses phrasses[0]="phrasse 1" phrasses[1]="phrasse 2 something'something\"something\" https://www.domain.com/');" phrasses[2]="phrasse 3" wheretosearch=/home outputfile=/tmp/find_malicious_output.txt for (( i=0;i<${#phrasses[*]};i++ )); do phrasse=${phrasses[$i]} echo "$phrasse" find $wheretosearch -type f -size -800k -mmin -1440 -exec grep -l "$phrasse" {} \; >> $outputfile Please how can i make this to search one file only once and all phrasses in it? 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 Continue reading... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.