Is there way to curl and grep for an expression while matching a first line (which contains status code) using grep? (Without saving the result of the curl on a file or a variable.)
I am thinking some thing like this but using grep -
curl -is "http://example.com/test.html" | awk 'NR == 1 || /'"JOB_STATUS"'/'
using maybe head and grep
head -n 1 and grep -E "exp[ab]"