I wanna grep for a pattern logs 1 2 & 3 within a folder containing 100 logs
grep "test" /folder/log1 /folder/log2 /folder/log3
The above command will work fine
but is there any command like
grep "test" /folder/log1, log2, log3 or something similar
anbu23
2
grep "test" /folder/log[1-3]
Er..what if their names arent log1 log2 and log3....say if its xx yy zz..then???
Since they are within a folder
run simple grep
grep "pattern" *.*
else
find . -type f -name '*.*' -print | xargs grep -il 'pattern'