Heya guys, I have this small script and i need to grep all the files and leave only the ones that contain a keyword and I'm stuck on this, any help in pointing out my dumb errors is appreciated :)
#!/bin/bash
server=(server1...server24)
.
.
.
for ((n=0; n <= 24 ; n++))
do
if grep -q "KEYWORD" directory/${server[$n]}.html ; then
echo Empty
else
rm -f directory/${server[$n]}.html
fi
done
.
.
.