Skip to content

Instantly share code, notes, and snippets.

@ConorShore
Created August 21, 2023 20:01
Show Gist options
  • Save ConorShore/587cf82d0742453509df31cf7c87ac3c to your computer and use it in GitHub Desktop.
Save ConorShore/587cf82d0742453509df31cf7c87ac3c to your computer and use it in GitHub Desktop.
One liner for extracting YouTube IDs from filenames when enclose in []. Useful for yt-dlp’s download archive option
ls -R | grep -o -P '.{0,11}\]' | cut -c 1-11 | sort -u | xargs -Iytid echo "youtube ytid" > .Downloaded
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment