macos – Utilizing curl to obtain picture, and duplicate to the PNG to the clipboard

on

|

views

and

comments


I am utilizing curl and grep to get the URL of a picture, after that I might prefer to obtain the picture itself, and duplicate it to the clipboard immediately, somewhat than saving it to the disk briefly earlier than. I am puzzled that the output would not appear to work. It solely provides me “textual content” somewhat than the picture itself. This is the command I’ve thus far:

curl -s https://www.tradingview.com/x/4WuY06rl/ | grep -oE "src="https://apple.stackexchange.com/questions/454737/[^"]+'" | sed -E "s/src="([^"]+)'/1/" | xargs curl -s | pbcopy

If there’s a better resolution to this, please let me know. The command is constructed round the concept that the web site right here has solely ONE img tag.

Share this
Tags

Must-read

Waymo is attempting to seduce me. However an alternative choice is staring us within the face | Dave Schilling

It’s Tremendous Bowl weekend right here in America, which suggests a number of issues: copious quantities of gut-busting meals, controversial half-time present performances,...

Waymo raises $16bn to gas international robotaxi enlargement | Know-how

Self-driving automobile firm Waymo on Monday stated it raised $16bn in a funding spherical that valued the Alphabet subsidiary at $126bn.Waymo co-chief executives...

Self-driving taxis are coming to London – ought to we be anxious? | Jack Stilgoe

At the top of the nineteenth century, the world’s main cities had an issue. The streets had been flooded with manure, the unintended...

Recent articles

More like this

LEAVE A REPLY

Please enter your comment!
Please enter your name here