0
这里是我当前正在运行的命令:管道grep响应第二个命令?
curl 'http://test.com/?id=12345' | grep -o -P '(?<=content="2;url=).*?(?=")'
此命令的响应是一个URL,就像这样:
$ curl 'http://test.com/?id=12345' | grep -o -P '(?<=content="2;url=).*?(?=")'
http://google.com
我想用什么那URL是基本上做到这一点:
curl 'http://test.com/?id=12345' | grep -o -P '(?<=content="2;url=).*?(?=")' | curl 'http://google.com'
有没有简单的方法可以在一行中完成这一切?