a-shell
a-shell copied to clipboard
pbpaste in shell script
I copied a YouTube URL and tried following commands but failed:
yt-dlp | pbpaste
Then
yt-dlp $(pbpaste)
Then I tried a shell script like this:
set pb = $(pbpaste) yt-dlp $pb set =
Now that all these tries failed, I'm wondering what's the correct command or script.Both yt-dlp and pbpaste work well in a-Shell.
For these things, the "xargs" command is great: "pbpaste | xargs yt-dlp" should do what you want (it sends its input to the arguments of the command that follows).