Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67441

how use xargs with grep and head for get first ocurrence of each website?

$
0
0

in each page i have multiple links of png I need obtain the second png link of each page but this command only get the second link of first page

how i could solve

echo "linkh\nlfinkh\nlinekh\nli3nkh\n"|xargs  -d '\n' -n1 -I  % curl  -s -N 'https://www.myweb.org/images?q=%'  |  grep -shoP "(http).*?(png|jpg|jpeg)" |sed -n 2p  

this command only output one link

I need to output four link (the second link of each page)

please help me

https://www.myweb.org/images?q=linkh the first page have a http:ffeefe.png

https://www.myweb.org/images?q=lfinkh the second page have a http:f43feefe.png

https://www.myweb.org/images?q=linekh the third page have a http:f433feefe.png

https://www.myweb.org/images?q=li3nkh the fourth page have a http:f435feefe.png


Viewing all articles
Browse latest Browse all 67441

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>