linux - grep and curl commands -
i trying find instances of word (pattern) "zardoz" in output of command:
curl http://imdb.com/title/tt0070948 i tried using: curl http://imdb.com/title/tt0070948 | grep "zardoz"
but returned "file not found".
any suggestions? use grep this.
you need tell curl use -l (--location) option:
curl -l http://imdb.com/title/tt0070948 | grep "zardoz" (http/https) if server reports requested page has moved different location (indicated location: header , 3xx response code), option make curl redo request on new place
when curl follows redirect , request not plain (for example post or put), following request if http response 301, 302, or 303. if response code other 3xx code, curl re-send following request using same unmodified method
.
Comments
Post a Comment