I'm trying to use sed to remove the rest of a line after:  HTTP1.1 200I can't figure out how to get sed to understand I want that whole thing as a string to match, including the double quote and the space.An example for good measure, I want to turn:GET /images/loading.gif HTTP/1.1 200 10819 https://...into GET /images/loading.gif HTTP/1.1 200
sed to remove all after a string?
sed
You have to quote strings with spaces when you use sed (or most other tools) from the commandline. And since you already use the double quote, you have to go for single quotes:echo 'GET /images/loading.gif HTTP/1.1 200 10819 https://...' | \     sed 's|HTTP/1.1 200.*|HTTP/1.1 200|'gives:GET /images/loading.gif HTTP/1.1 200