1
I'm still fairly new to linux. I've been a user for about 2 months. I understand how to do basic pipings with grep and write STDOUT
to text files.
I'm trying to do something similar with my clipboard utility gpaste.
I'd like to use the text that I copy URL info from my gui browser and paste it into a terminal command. The next step would be to learn how to scrape this information automatically and run it through similar manipulations, but let's not get ahead of ourselves.
My process, I open gpaste ui
and copy the youtube url in question. It gets entered into gpaste history.
When I enter gpaste get [#]
the correct entry is returned, great.
However when I attempt to manipulate that data in another application, like youtube-dl, I run into the error "gpaste is not a recognizable url."
Here's what I've tried:
youtube-dl | gpaste 0
gpaste get [#] | youtube-dl
Not very creative, I know, but what the hey...
Any suggestions?
that worked! Great! Thanks!
So whats the deal with the $()? What am I telling bash whenever I do that? – Andrew – 2015-09-29T20:56:39.877
1@AndÚ
echo $(whatever commands you want)
means that bash executes whatever is between the (..) and what it returns is used as an argument to echo. So ifwhatever commands you want
should print out Hello AndÚ the result woud beecho Hello AndÚ
– Nifle – 2015-09-30T08:32:13.843