Skip to content

Instantly share code, notes, and snippets.

@StevenMaude
Created March 26, 2016 22:56
Show Gist options
  • Save StevenMaude/bf60d4de18f7e0620adc to your computer and use it in GitHub Desktop.
Save StevenMaude/bf60d4de18f7e0620adc to your computer and use it in GitHub Desktop.
Get episode PIDs from a file containing BBC iPlayer URLs, one per line
#!/bin/sh
# Usage: ./url-to-pid.sh <URL file>
cat $1 | grep -oP '(?<=episode/)\w+' | paste -d"," -s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment