zsh: no matches found workaround ?

15 Likes Comment

Solving “zsh: no matches found” error when running youtube-dl mp3 extract task. Here is my bash script on my Macbook :

#!/bin/bash
URL=$1

# function: guide
guide () {
  echo "Youtube URL is required."
}

# function: download audio and convert to mp3
download_and_convert() {
  youtube-dl -f bestaudio --extract-audio --audio-format mp3 $URL
}

# check parameter
if [ $# = 0 ]; then
  guide
else
  download_and_convert
fi

Usage: getaudio youtube-url

and I met the error message: zsh: no matches found

I got fixed by a single quote for the youtube-url.

Usage: getaudio ‘youtube-url’ ( youtube-dl ‘{video_url}’)

You might like

About the Author: Toc Xoan

This guy likes taking photos, hunting cheap tours, exploring the unique culture of every cities of Vietnam. Contact: [email protected] I've created a dogecoin wallet to receive blog funding: DE6F5FisSCy7yz5rpHY1ChMSGYnDMpFZ1Q

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.