How do I find everything between two characters after a word using grep, without outputting the entire line?
Posted
by
Nick Sweeting
on Stack Overflow
See other posts from Stack Overflow
or by Nick Sweeting
Published on 2010-12-29T09:21:36Z
Indexed on
2012/07/08
3:16 UTC
Read the original article
Hit count: 131
I am downlading the info.0.json file from xkcd and trying to parse just the alt text. I don't care if there are quotes around it or not. The problem it that the info.0.json file is all one line, and the alt text is in quotes after the word "alt=". Trying cat info.0.json | grep alt
just returns the whole file (because it's all one line). What is the grep or sed code that will get me the alt text?
© Stack Overflow or respective owner