Μπορείς πολύ εύκολα να το κάνεις με ένα bash shell script. Δημιουργείς ένα αρχείο κειμένου με όνομα π.χ. yt.sh και εισάγεις σε αυτό το παρακάτω περιεχόμενο:
#!/bin/bash # This is a bash script thus it must be interpreted by bash # Echo a prompt: echo Please type the video URL: # Read the string user types into a variable with name url: read url # Run youtube-dl giving it url string as its last parameter: youtube-dl -f bestvideo[ext=mp4]+bestaudio[m4a] $url Στο τέλος θα χρειαστεί να δώσεις το execution flag στο αρχείο: chmod +x yt.sh Ακόμα, ίσως θες να το βάλεις σε κάποιο σημείο που βρίσκεται στο PATH του shell σου, ώστε να μην χρειάζεσαι τη διαδρομή του για να το καλέσεις, όπως π.χ. στο ~/.local/bin/ . --- Konstantinos Togias M.Sc. in Mathematics of Computers and Decision Making Software & Web Applications Developer tel. (+30)6946977595 e-mail: [email protected] www: http://ktogias.gr On Mon, Feb 25, 2019 at 2:09 PM Αντώνης Αντωνούλας <[email protected]> wrote: > Θα ήθελα τη βοήθειά σας σε ένα θέμα που έχει σχέση με το τερματικό. > > Χρησιμοποιώ το youtube-dl για να κατεβάσω κάποιο βίντεο από το youtube > κάνοντας χρήση της εντολής: > > youtube-dl -f bestvideo[ext=mp4]+bestaudio[m4a] > > και ακολούθως επικολλώ το url του βίντεο δίπλα από την εντολή. > > Υπάρχει τρόπος να δημιουργήσω κάποιο script με όνομα π.χ. yt και μόλις > το πληκτρολογώ να τρέχει τη συγκεκριμένη εντολή ζητώντας μου το url ώστε > η διαδικασία να γίνεται ευκολότερα; > > Ευχαριστώ εκ των προτέρων για την όποια βοήθεια. > > > -- > Ubuntu-gr mailing list > [email protected] > > If you do not want to receive any more messages from the ubuntu-gr mailing > list, please follow this link and choose unsubscribe: > https://lists.ubuntu.com/mailman/listinfo/ubuntu-gr > -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://lists.ubuntu.com/archives/ubuntu-gr/attachments/20190225/2b16b9f1/attachment.html> -- Ubuntu-gr mailing list [email protected] If you do not want to receive any more messages from the ubuntu-gr mailing list, please follow this link and choose unsubscribe: https://lists.ubuntu.com/mailman/listinfo/ubuntu-gr

