made it so i just click file and paste YouTube url
Linux is amazing
#! /usr/bin/bash
echo "Enter a url"
read a
yt-dlp -x $a
made it so i just click file and paste YouTube url
Linux is amazing
#! /usr/bin/bash
echo "Enter a url"
read a
yt-dlp -x $a
Very happy you had fun making the little script! One thing that will become important pretty quick if you continue making these scripts is that it’s almost always better to wrap your variables in quotes - so it becomes
yt-dlp -x “$a”. It’s okay here but if you ever paste something that has a space in it, this will keep it together ‘as one’.If you want to expand your knowledge with this, some fruitful paths to go down are the following:
The last one is already quite a bit advanced but if you can do that you have enough of the ‘programming’ basics of the shell down to a degree that you can create many little helpers like this with ease.
Of course don’t feel forced to do any of that - if you’re happy with the improvement as-is, that’s all you need to enjoy the fun of Linux!