Just a little disclaimer, I am not very good at programming, so please excuse me if I use any conditions incorrectly / in a confusing way.
I want to be able to extract certain information from a web page and am trying to do this by passing the output of the curl function to grep. Oh, and this is in cygwin, if that matters.
When you print only
$ curl www.ncbi.nlm.nih.gov/gene/823951
The terminal prints the entire web page in what I consider html. From here, I thought that I could just pass this output to the grep function with any search query:
$ curl www.ncbi.nlm.nih.gov/gene/823951 | grep "Gene Symbol"
But instead of printing the web page in general, the terminal gives me:
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 142k 0 142k 0 0 41857 0 --:--:-- 0:00:03 --:--:-- 42083
Can someone explain why he is doing this / how can I search for specific lines of text on a web page? Ultimately, I want to compile information into the database, such as names, types and descriptions of genes, so I was hoping to subsequently export the results from the grep function to a text file.
Any help is greatly appreciated, thanks in advance!
bash grep search curl cygwin
David xie
source share