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

From Black Field to Glass Field: AV 3.0, Bodily AI, and the Way forward for Lengthy-Haul Trucking

All of it started with rules-based, open ebook software program. In 2007, the Torc crew VictorTango drove Odin, a 2005 Ford Escape hybrid...

Nissan turnaround plan pins hopes on ‘AI-defined automobiles’ | Nissan

Nissan has stated it is going to add self-driving talents to the overwhelming majority of its automobiles and reduce a fifth of its...

‘System malfunction’ causes robotaxis to stall in the midst of the highway in China | Self-driving vehicles

A “system malfunction” has brought on a number of self-driving robotaxis to stall in the midst of the highway in China, police have...

Recent articles

More like this

LEAVE A REPLY

Please enter your comment!
Please enter your name here