Using grep to print a keyword in a log to the output file
grep -i -n "application" /app/log1.log > L1.log
Now this gives results if it finds application in the log. But also results empty l1 log file where there are no results.
Would like assistance in creating the l1.log only when there are results.