<p>I am searching a kubernetes pod logs for the pattern “variable=value”  ( e.g., variable=10 or variable=500) using the command below:</p>
<pre><code>Kubectl logs -f | grep “variable=”
</code></pre>
<p>My question is that wether it is possible to modify the command above in order to return the logs where the variable value is greater than some threshold, e.g, for <code>threshold=300</code>, <code>variable=301</code>, <code>variable=302</code> would be filetered in, but <code>variable=299</code> would be filtered out</p>
<p>I know I can develop a small program for this, but rather I want a rapid solution in the command line direcly without the hassle of writing a small prgram.</p>

Mazen Ezzeddine
<p>You didn't provide any sample input so it's a guess but this may be what you're trying to do:</p>
<pre><code>awk -F'=' '($1==&quot;variable&quot;) &amp;&amp; ($2&gt;300)' file
</code></pre>
<p>If that's not all you need then please <a href="https://stackoverflow.com/posts/72227976/edit">edit</a> your question to include a <a href="https://stackoverflow.com/help/minimal-reproducible-example">Minimal, Reproducible Example</a> with concise, testable sample input, expected output and your attempt to solve the problem yourself so we can help you further. See [ask] and look at existing questions that have been upvoted and answered for examples.</p>
