Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pbpaste in shell script #775

Open
woncheol-kim opened this issue May 11, 2024 · 1 comment
Open

pbpaste in shell script #775

woncheol-kim opened this issue May 11, 2024 · 1 comment

Comments

@woncheol-kim
Copy link

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.

@holzschu
Copy link
Owner

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants