I have been looking at performance for a web application. I am using ab to compare the response times while adjusting the database indexing.
The curl command is logging in to the application and saving the cookies in a file named cookie-jar.
The grep command is extracting the session id cookie - name and value - from the cookie-jar and using it to authorize access to a main page for ab.
This post courtesy of Game Creek Video